Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
- data TimeInterval
- toMicroSeconds :: TimeInterval -> Int
- toMilliSeconds :: TimeInterval -> Double
- toSeconds :: TimeInterval -> Double
- toMinutes :: TimeInterval -> Double
- toHours :: TimeInterval -> Double
- toDays :: TimeInterval -> Double
- toNominalDiffTime :: TimeInterval -> NominalDiffTime
- fromTime :: TimeInterval -> UTCTime -> UTCTime
- fromNow :: TimeInterval -> IO UTCTime
- agoTime :: TimeInterval -> UTCTime -> UTCTime
- ago :: TimeInterval -> IO UTCTime
- microSeconds :: Int -> TimeInterval
- milliSeconds :: Int -> TimeInterval
- seconds :: Int -> TimeInterval
- minutes :: Int -> TimeInterval
- hours :: Int -> TimeInterval
- days :: Int -> TimeInterval
Documentation
data TimeInterval Source
TimeInterval to different units and types
toMicroSeconds :: TimeInterval -> Int Source
converts the supplied TimeInterval
to microseconds
toMilliSeconds :: TimeInterval -> Double Source
converts the supplied TimeInterval
to milliseconds
toSeconds :: TimeInterval -> Double Source
converts the supplied TimeInterval
to seconds
toMinutes :: TimeInterval -> Double Source
converts the supplied TimeInterval
to minutes
toHours :: TimeInterval -> Double Source
converts the supplied TimeInterval
to hours
toDays :: TimeInterval -> Double Source
converts the supplied TimeInterval
to days
toNominalDiffTime :: TimeInterval -> NominalDiffTime Source
converts the supplied TimeInterval
to NominalDiffTime
Time manipulation
fromTime :: TimeInterval -> UTCTime -> UTCTime Source
Adds TimeInterval
to UTCTime
returning a UTCTime
in the
future
fromNow :: TimeInterval -> IO UTCTime Source
Adds TimeInterval
to getCurrentTime
returning a
UTCTime
in the future
agoTime :: TimeInterval -> UTCTime -> UTCTime Source
Substracts TimeInterval
from UTCTime
returning a UTCTime
in
the past
ago :: TimeInterval -> IO UTCTime Source
Substracts TimeInterval
from getCurrentTime
returning a
UTCTime
in the past
Unit functions
microSeconds :: Int -> TimeInterval Source
given a number, produces a TimeInterval
of microseconds
milliSeconds :: Int -> TimeInterval Source
given a number, produces a TimeInterval
of milliseconds
seconds :: Int -> TimeInterval Source
given a number, produces a TimeInterval
of seconds
minutes :: Int -> TimeInterval Source
given a number, produces a TimeInterval
of minutes
hours :: Int -> TimeInterval Source
given a number, produces a TimeInterval
of hours
days :: Int -> TimeInterval Source
given a number, produces a TimeInterval
of days