System.CPUTime.Clock
Description
From time.h, provides clockid_t, timespec, clock_gettime, clock_getres.
Documentation
Clock types
Constructors
| Monotonic | Clock that cannot be set and represents monotonic time since some unspecified starting point. |
| Realtime | System-wide realtime clock |
| ProcessTime | High-resolution per-process timer from the CPU. |
| ThreadTime | Thread-specific CPU-time clock. |
TimeSpec structure
clock_gettime :: Clock -> IO TimeSpecSource
Retrieves the time of the specified clock.
clock_getres :: Clock -> IO TimeSpecSource
Finds the resolution (precision) of the specified clock.