Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- humanReadableDuration :: Micro -> String
- humanReadableDuration' :: Real a => a -> String
- ms :: Micro
- oneSecond :: Micro
- minute :: Micro
- hour :: Micro
- day :: Micro
- year :: Micro
- getMs :: Micro -> Integer
- getSeconds :: Micro -> Integer
- getMinutes :: Micro -> Integer
- getHours :: Micro -> Integer
- getDays :: Micro -> Integer
- getYears :: Micro -> Integer
Documentation
humanReadableDuration :: Micro -> String Source
humanReadableDuration
take some time in micro-second precision and render a human readable duration.
let duration = 2 * ms + 3 * oneSecond + 2 * minute + 33*day + 2*year humanReadableDuration duration -- will return: "2 years 33 days 2 min 3s 32ms"
humanReadableDuration' :: Real a => a -> String Source
getSeconds :: Micro -> Integer Source
number of seconds given a duration in micro seconds
getMinutes :: Micro -> Integer Source
number of minutes given a duration in micro seconds