Safe Haskell | Safe-Inferred |
---|
High-resolution, realtime clock and timer functions for Posix systems. This module is being developed according to IEEE Std 1003.1-2008: http://www.opengroup.org/onlinepubs/9699919799/, http://www.opengroup.org/onlinepubs/9699919799/functions/clock_getres.html#
Documentation
Clock types. A clock may be system-wide (that is, visible to all processes) or per-process (measuring time that is meaningful only within a process). All implementations shall support CLOCK_REALTIME.
Monotonic | The identifier for the system-wide monotonic clock, which is defined as a clock measuring real time, whose value cannot be set via clock_settime and which cannot have negative clock jumps. The maximum possible clock jump shall be implementation-defined. For this clock, the value returned by |
Realtime | The identifier of the system-wide clock measuring real time. For this clock, the value returned by getTime represents the amount of time (in seconds and nanoseconds) since the Epoch. |
ProcessCPUTime | The identifier of the CPU-time clock associated with the calling process. For this clock, the value returned by getTime represents the amount of execution time of the current process. |
ThreadCPUTime | The identifier of the CPU-time clock associated with the calling OS thread. For this clock, the value returned by getTime represents the amount of execution time of the current OS thread. |
TimeSpec structure
getTime :: Clock -> IO TimeSpecSource
The getTime
function shall return the current value for the
specified clock.