BSD-3-Clause licensed by Andrew Martin
Maintained by [email protected]
This version can be pinned in stack with:chronos-1.0.4@sha256:d64faf553bd3295b102b74f47b29ba4e89c1f904d2beba50cbea5778088b261d,2958

Module documentation for 1.0.4

Performance-oriented time library for haskell. The main differences between this and "time" are that this library:

  • Uses machine integers where possible. This means that some time-related arithmetic should be faster. It also means that the types are incapable of representing times that are very far in the future or the past.

  • Provides ToJSON and FromJSON instances for json serialization.

  • Provides Unbox instances for working with unboxed vectors.

  • Uses normal non-overloaded haskell functions for encoding and decoding time. It provides "attoparsec" parsers for both Text and ByteString. Additionally, it provides functions for encoding time as Text or ByteString. The "time" library uses accomplishes these with the Data.Time.Format module, which uses UNIX-style datetime format strings. It is expected that the approach taken in this library is faster and catches more mistakes at compile time at the cost of being less expressive.

  • Only provides nanosecond resolution instead of picosecond resolution.