si-timers: timers using SI units (seconds)

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

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


[Skip to Readme]

Properties

Versions 1.0.0.0, 1.0.0.1, 1.1.0.0, 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.19), io-classes (>=1.0 && <1.2), mtl, stm, time (>=1.9.1 && <1.13) [details]
License Apache-2.0[multiple license files]
Copyright 2022-2023 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 Control
Source repo head: git clone https://github.com/input-output-hk/io-sim(io-sim)
Uploaded by coot at 2023-04-26T13:10:12Z

Modules

[Index] [Quick Jump]

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


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