Data.Time.Clock.System
Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Description
Fast access to the system clock.
The day of the epoch of SystemTime
, 1970-01-01
data SystemTime Source
SystemTime
is time returned by system clock functions. Its semantics depends on the clock function, but the epoch is typically the beginning of 1970. Note that systemNanoseconds
of 1E9 to 2E9-1 can be used to represent leap seconds.
Constructors
MkSystemTime | |
Fields
|
Instances
Eq SystemTime | |
Defined in Data.Time.Clock.Internal.SystemTime | |
Ord SystemTime | |
Defined in Data.Time.Clock.Internal.SystemTime Methodscompare :: SystemTime -> SystemTime -> Ordering (<) :: SystemTime -> SystemTime -> Bool (<=) :: SystemTime -> SystemTime -> Bool (>) :: SystemTime -> SystemTime -> Bool (>=) :: SystemTime -> SystemTime -> Bool max :: SystemTime -> SystemTime -> SystemTime min :: SystemTime -> SystemTime -> SystemTime | |
Show SystemTime | |
Defined in Data.Time.Clock.Internal.SystemTime MethodsshowsPrec :: Int -> SystemTime -> ShowS Source show :: SystemTime -> String Source showList :: [SystemTime] -> ShowS Source | |
NFData SystemTime | |
Defined in Data.Time.Clock.Internal.SystemTime Methodsrnf :: SystemTime -> () Source |
truncateSystemTimeLeapSecond :: SystemTime -> SystemTime Source
Map leap-second values to the start of the following second. The resulting systemNanoseconds
will always be in the range 0 to 1E9-1.
getSystemTime :: IO SystemTime Source
Get the system time, epoch start of 1970 UTC, leap-seconds ignored. getSystemTime
is typically much faster than getCurrentTime
.
systemToUTCTime :: SystemTime -> UTCTime Source
Convert SystemTime
to UTCTime
, matching zero SystemTime
to midnight of systemEpochDay
UTC.
utcToSystemTime :: UTCTime -> SystemTime Source
Convert UTCTime
to SystemTime
, matching zero SystemTime
to midnight of systemEpochDay
UTC.
systemToTAITime :: SystemTime -> AbsoluteTime Source
Convert SystemTime
to AbsoluteTime
, matching zero SystemTime
to midnight of systemEpochDay
TAI.
© The University of Glasgow and others
Licensed under a BSD-style license (see top of the page).
https://downloads.haskell.org/~ghc/8.10.2/docs/html/libraries/time-1.9.3/Data-Time-Clock-System.html