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 #
A number of seconds elapsed since an epoch.
Eq (ElapsedSince epoch) # | |
Data epoch => Data (ElapsedSince epoch) # | |
Num (ElapsedSince epoch) # | |
Ord (ElapsedSince epoch) # | |
Read (ElapsedSince epoch) # | |
Show (ElapsedSince epoch) # | |
NFData (ElapsedSince epoch) # | |
Epoch epoch => Time (ElapsedSince epoch) # | |
Epoch epoch => Timeable (ElapsedSince epoch) # | |
data ElapsedSinceP epoch #
A number of seconds and nanoseconds elapsed since an epoch.
ElapsedSinceP !(ElapsedSince epoch) !NanoSeconds |
Eq (ElapsedSinceP epoch) # | |
Data epoch => Data (ElapsedSinceP epoch) # | |
Num (ElapsedSinceP e) # | |
Ord (ElapsedSinceP epoch) # | |
Read (ElapsedSinceP epoch) # | |
Show (ElapsedSinceP epoch) # | |
NFData (ElapsedSinceP e) # | |
Epoch epoch => Time (ElapsedSinceP epoch) # | |
Epoch epoch => Timeable (ElapsedSinceP epoch) # | |
Epoch
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 #
Windows Epoch, starting 1st January 1601