License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Epoch tracking
- newtype ElapsedSince epoch = ElapsedSince Seconds
- data ElapsedSinceP epoch = ElapsedSinceP !(ElapsedSince epoch) !NanoSeconds
- class Epoch epoch where
- data UnixEpoch = UnixEpoch
- data WindowsEpoch = WindowsEpoch
computer time tracking with various epoch
newtype ElapsedSince epoch Source #
A number of seconds elapsed since an epoch.
Eq (ElapsedSince epoch) Source # | |
Data epoch => Data (ElapsedSince epoch) Source # | |
Num (ElapsedSince epoch) Source # | |
Ord (ElapsedSince epoch) Source # | |
Read (ElapsedSince epoch) Source # | |
Show (ElapsedSince epoch) Source # | |
NFData (ElapsedSince epoch) Source # | |
Epoch epoch => Time (ElapsedSince epoch) Source # | |
Epoch epoch => Timeable (ElapsedSince epoch) Source # | |
data ElapsedSinceP epoch Source #
A number of seconds and nanoseconds elapsed since an epoch.
ElapsedSinceP !(ElapsedSince epoch) !NanoSeconds |
Eq (ElapsedSinceP epoch) Source # | |
Data epoch => Data (ElapsedSinceP epoch) Source # | |
Num (ElapsedSinceP e) Source # | |
Ord (ElapsedSinceP epoch) Source # | |
Read (ElapsedSinceP epoch) Source # | |
Show (ElapsedSinceP epoch) Source # | |
NFData (ElapsedSinceP e) Source # | |
Epoch epoch => Time (ElapsedSinceP epoch) Source # | |
Epoch epoch => Timeable (ElapsedSinceP epoch) Source # | |
Epoch
class Epoch epoch where Source #
epoch related.
We use the well known Unix epoch as the reference timezone for doing conversion between epochs.
Each methods of this typeclass should not use the actual value, but only get the information needed from the type itself.
standard and usual epochs
Unix Epoch, starting 1st January 1970
data WindowsEpoch Source #
Windows Epoch, starting 1st January 1601