lambdabot-core-5.3.1.2: Lambdabot core functionality
Safe HaskellSafe-Inferred
LanguageHaskell98

Lambdabot.Compat.AltTime

Description

Time compatibility layer (stuff to support old lambdabot state serialization formats)

TODO: trim this down to just the explicitly serialization-related stuff

Synopsis

Documentation

data ClockTime Source #

Wrapping ClockTime (which doesn't provide a Read instance!) seems easier than talking care of the serialization of UserStatus ourselves.

Instances

Instances details
Read ClockTime Source # 
Instance details

Defined in Lambdabot.Compat.AltTime

Show ClockTime Source # 
Instance details

Defined in Lambdabot.Compat.AltTime

Binary ClockTime Source # 
Instance details

Defined in Lambdabot.Compat.AltTime

Eq ClockTime Source # 
Instance details

Defined in Lambdabot.Compat.AltTime

getClockTime :: IO ClockTime Source #

Retrieve the current clocktime

diffClockTimes :: ClockTime -> ClockTime -> TimeDiff Source #

Difference of two clock times

addToClockTime :: TimeDiff -> ClockTime -> ClockTime Source #

addToClockTime d t adds a time difference d 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