Calico
|
Functions for accessing a monotonic wall clock. More...
Functions | |
static double | get_wclock (const wclock *clock) |
Retrieve the time from a monotonic wall clock in seconds. More... | |
static double | get_wclock_res (const wclock *clock) |
Obtain the resolution of the monotonic wall clock in seconds. More... | |
static int | init_wclock (wclock *clock) |
Initialize a value needed to access the monotonic wall clock. More... | |
Functions for accessing a monotonic wall clock.
Note: on systems other than Windows or Mac OS X, it is strongly recommended to define _POSIX_C_SOURCE
to a value of at least 199309L
before the inclusion of this header or any system header.
|
inlinestatic |
Retrieve the time from a monotonic wall clock in seconds.
clock | An wclock value previously initialized by init_wclock . |
NAN
is returned.Due to the use of double-precision floating point numbers, the precision is at worst (for an ideal system with hundreds of years in uptime) limited to about a few microseconds. In practice, it is usually much less.
|
inlinestatic |
Obtain the resolution of the monotonic wall clock in seconds.
clock | An wclock value previously initialized by init_wclock . |
NAN
is returned.
|
inlinestatic |
Initialize a value needed to access the monotonic wall clock.
The clock does not need to be deinitialized.
clock | An existing wclock value to be initialized. |