Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Time compatibility layer (stuff to support old lambdabot state serialization formats)
TODO: trim this down to just the explicitly serialization-related stuff
Synopsis
- data ClockTime
- getClockTime :: IO ClockTime
- diffClockTimes :: ClockTime -> ClockTime -> TimeDiff
- addToClockTime :: TimeDiff -> ClockTime -> ClockTime
- timeDiffPretty :: TimeDiff -> String
- newtype TimeDiff = TimeDiff NominalDiffTime
- noTimeDiff :: TimeDiff
Documentation
Wrapping ClockTime (which doesn't provide a Read instance!) seems easier than talking care of the serialization of UserStatus ourselves.
getClockTime :: IO ClockTime Source #
Retrieve the current clocktime
addToClockTime :: TimeDiff -> ClockTime -> ClockTime Source #
adds a time difference addToClockTime
d td
and a -- clock
time t
to yield a new clock time.
timeDiffPretty :: TimeDiff -> String Source #
Pretty-print a TimeDiff. Both positive and negative Timediffs produce the same output.
14d 17h 8m 53s