| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Data.Time.Clock.DiffTime
Synopsis
Documentation
This is a length of time, as measured by a clock.
Conversion functions such as fromInteger and realToFrac will treat it as seconds.
For example, (0.010 :: DiffTime) corresponds to 10 milliseconds.
It has a precision of one picosecond (= 10^-12 s). Enumeration functions will treat it as picoseconds.
Instances
secondsToDiffTime :: Integer -> DiffTime #
Create a DiffTime which represents an integral number of seconds.
picosecondsToDiffTime :: Integer -> DiffTime #
Create a DiffTime from a number of picoseconds.
diffTimeToFullMicroseconds :: DiffTime -> Int Source #
Rounds down. Useful for threadDelay, timeout, etc.
diffTimeToPicoseconds :: DiffTime -> Integer #
Get the number of picoseconds in a DiffTime.