si-timers: timers using SI units (seconds)

[ apache, library, time ] [ Propose Tags ]

Timers using SI units (seconds) which are safe on 32-bit platforms and compatible with io-sim.


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
asserts

Enable assertions

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 1.0.0.0, 1.0.0.1, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.4.0.0
Change log CHANGELOG.md
Dependencies base (>=4.9 && <4.20), deepseq, io-classes (>=1.4 && <1.5), mtl, nothunks, stm, time (>=1.9.1 && <1.13) [details]
License Apache-2.0[multiple license files]
Copyright 2022-2024 Input Output Global Inc (IOG)
Author Duncan Coutts, Neil Davis, Marcin Szamotulski
Maintainer Duncan Coutts duncan@well-typed.com, Marcin Szamotulski coot@coot.me
Category Time
Bug tracker https://github.com/input-output-hk/io-sim/issues
Source repo head: git clone https://github.com/input-output-hk/io-sim(io-sim)
Uploaded by coot at 2024-02-02T16:54:36Z
Distributions NixOS:1.4.0.0
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 1738 total (239 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-02-02 [all 1 reports]

Readme for si-timers-1.4.0.0

[back to package description]

SI Timers

The si-timers package provides delays & timeouts which are safe on 32-bit systems; cancellable timeouts (see registerDelayCancellable); a refined interface for monotonic Time. Time is given with left monoid action of DiffTime (which encodes the notion of time differences). The MonadMonotonicTime, MonadDelay type classes & MonadTimers (type synonym) API provide a consistent interface for working with delays and timeouts.

si-timers package also defined a low level MonadTimout type class. On system with a native timer manager (e.g. Linux, MacOS, FreeBSD), it's very efficient but for other platforms (e.g. Windows), it might not be the right API for low latency timeouts needed for example for low level networking code, because it relies on GHC's RTS thread scheduling.

si-timers are compatible with io-sim.

The SI comes from the International System of Units.