Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Data.Time.TimeSpan
- data TimeSpan
- milliseconds :: Double -> TimeSpan
- seconds :: Double -> TimeSpan
- minutes :: Double -> TimeSpan
- hours :: Double -> TimeSpan
- days :: Double -> TimeSpan
- weeks :: Double -> TimeSpan
- toMicroseconds :: TimeSpan -> Double
- toMilliseconds :: TimeSpan -> Double
- toSeconds :: TimeSpan -> Double
- toMinutes :: TimeSpan -> Double
- toHours :: TimeSpan -> Double
- toDays :: TimeSpan -> Double
- toWeeks :: TimeSpan -> Double
- absTS :: TimeSpan -> TimeSpan
- multiplyTS :: TimeSpan -> Double -> TimeSpan
- diffUTCTimeTS :: UTCTime -> UTCTime -> TimeSpan
- addUTCTimeTS :: TimeSpan -> UTCTime -> UTCTime
- subUTCTimeTS :: TimeSpan -> UTCTime -> UTCTime
- sleepTS :: TimeSpan -> IO ()
- timeoutTS :: TimeSpan -> IO a -> IO (Maybe a)
- timeAction :: IO a -> IO (TimeSpan, a)
Documentation
An abstract timespan. Use the provided smart constructors to create
a meaningful timespan. Note that on first sight a Num
instance might
seem desirable, but this would defeat the purpose of having transparent
and explicitly constructed timespans due to fromInteger
.
milliseconds :: Double -> TimeSpan Source #
toMicroseconds :: TimeSpan -> Double Source #
toMilliseconds :: TimeSpan -> Double Source #