| Copyright | (c) Alexey Radkov 2018-2022 |
|---|---|
| License | BSD-style |
| Maintainer | alexey.radkov@gmail.com |
| Stability | stable |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
NgxExport.Tools.TimeInterval
Description
A simple implementation of time intervals
A simple implementation of time intervals supposed for describing low resolution timeouts.
Exported data and functions
data TimeInterval Source #
Time intervals.
Note that Unset is a zero time interval which is equal to 0 seconds, however it is expected to be used differently. In particular, to explicitly express an intention to unset the timeout.
Constructors
| Hr Int | Hours |
| Min Int | Minutes |
| Sec Int | Seconds |
| HrMin Int Int | Hours and minutes |
| MinSec Int Int | Minutes and seconds |
| Unset | Zero time interval |
Instances
toSec :: TimeInterval -> Int Source #
Converts a time interval into seconds.
threadDelaySec :: Int -> IO () Source #
Delays the current thread by the specified number of seconds.