clock, nanoclock

Gamma: Version 4.0
Prev |  | Next

# `clock`, `nanoclock`

`clock`, `nanoclock` -- get the OS time.

## Syntax

    clock ()
    nanoclock ()

## Arguments

none

## Returns

The current clock value in seconds from the operating system as a long integer. `nanoclock` includes the nanoseconds as well.

## Description

This function gets the operating system clock setting in seconds. The time is usually expressed as the number of seconds from midnight January 1, 1970 on UNIX systems, though it may differ across implementations.

## Example

        Gamma> clock();
        999810273
        Gamma> nanoclock();
        999810273.66378700733
        Gamma>

See the GTK: Preparing Plots section of the Log Functions chapter, or the Common: Plot Setup section of the History Functions chapter in the Cogent Tools Demo and Tutorials book for examples of these function used in context.

## See Also

`date`, `date_of`

Prev | Home | Next
`cancel` | Up | `date`

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.