system-time-monotonic

Simple library for using the system's monotonic clock

https://github.com/joeyadams/haskell-system-time-monotonic

Latest on Hackage:0.2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Joey Adams
Maintained by [email protected]

Simple library for using the system's monotonic clock. This library is geared toward programs that need to run for long periods of time. It does not (necessarily) provide high-resolution timing.

  • On Windows, this uses GetTickCount64, but falls back to GetTickCount if it is not available. GetTickCount64 was introduced in Windows Vista and Windows Server 2008. Support for QueryPerformanceCounter is also available, but is not used by default, as it is less accurate in the long run than GetTickCount.

  • On Linux, this uses clock_gettime with CLOCK_MONOTONIC.

Release history:

0.2
Update driver API (SystemClock) to prevent cumulative precision loss.
0.1
Initial release.