si-timers: timers using SI units (seconds)

[ apache, deprecated, library, time ] [ Propose Tags ] [ Report a vulnerability ]
Deprecated in favor of io-classes

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, 1.5.0.0
Change log CHANGELOG.md
Dependencies base (>=4.9 && <4.21), deepseq, io-classes (>=1.5 && <1.6), mtl, nothunks, stm, time (>=1.9.1 && <1.13) [details]
Tested with ghc ==8.10 || ==9.2 || ==9.4 || ==9.6 || ==9.8 || ==9.10
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 IOHK at 2024-05-17T10:34:55Z
Distributions
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 3481 total (136 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-05-17 [all 1 reports]

Readme for si-timers-1.5.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.