| Safe Haskell | None |
|---|
Tiempo
Contents
- 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
- threadDelay :: TimeInterval -> IO ()
- microSeconds :: Int -> TimeInterval
- milliSeconds :: Int -> TimeInterval
- seconds :: Int -> TimeInterval
- minutes :: Int -> TimeInterval
- hours :: Int -> TimeInterval
- days :: Int -> TimeInterval
Documentation
data TimeInterval Source
Instances
TimeInterval to different units and types
toMicroSeconds :: TimeInterval -> IntSource
converts the supplied TimeInterval to microseconds
toMilliSeconds :: TimeInterval -> DoubleSource
converts the supplied TimeInterval to milliseconds
toSeconds :: TimeInterval -> DoubleSource
converts the supplied TimeInterval to seconds
toMinutes :: TimeInterval -> DoubleSource
converts the supplied TimeInterval to minutes
toHours :: TimeInterval -> DoubleSource
converts the supplied TimeInterval to hours
toDays :: TimeInterval -> DoubleSource
converts the supplied TimeInterval to days
toNominalDiffTime :: TimeInterval -> NominalDiffTimeSource
converts the supplied TimeInterval to NominalDiffTime
Time manipulation
fromTime :: TimeInterval -> UTCTime -> UTCTimeSource
Adds TimeInterval to UTCTime returning a UTCTime in the
future
fromNow :: TimeInterval -> IO UTCTimeSource
Adds TimeInterval to getCurrentTime returning a
UTCTime in the future
agoTime :: TimeInterval -> UTCTime -> UTCTimeSource
Substracts TimeInterval from UTCTime returning a UTCTime in
the past
ago :: TimeInterval -> IO UTCTimeSource
Substracts TimeInterval from getCurrentTime returning a
UTCTime in the past
Concurrency Utilities
threadDelay :: TimeInterval -> IO ()Source
Like Control.Concurrent.threadDelay but accepts a
TimeInterval instead of an Int
Unit functions
microSeconds :: Int -> TimeIntervalSource
given a number, produces a TimeInterval of microseconds
milliSeconds :: Int -> TimeIntervalSource
given a number, produces a TimeInterval of milliseconds
seconds :: Int -> TimeIntervalSource
given a number, produces a TimeInterval of seconds
minutes :: Int -> TimeIntervalSource
given a number, produces a TimeInterval of minutes
hours :: Int -> TimeIntervalSource
given a number, produces a TimeInterval of hours
days :: Int -> TimeIntervalSource
given a number, produces a TimeInterval of days