Safe Haskell | None |
---|---|
Language | Haskell2010 |
Ouroboros.Consensus.BlockchainTime.WallClock.Types
Synopsis
- newtype SystemStart = SystemStart { }
- newtype RelativeTime = RelativeTime { }
- addRelTime :: NominalDiffTime -> RelativeTime -> RelativeTime
- diffRelTime :: RelativeTime -> RelativeTime -> NominalDiffTime
- fromRelativeTime :: SystemStart -> RelativeTime -> UTCTime
- toRelativeTime :: SystemStart -> UTCTime -> RelativeTime
-
data
SystemTime
m =
SystemTime
{
- systemTimeCurrent :: m RelativeTime
- systemTimeWait :: m ()
- getSlotLength :: SlotLength -> NominalDiffTime
- mkSlotLength :: NominalDiffTime -> SlotLength
- slotLengthFromMillisec :: Integer -> SlotLength
- slotLengthFromSec :: Integer -> SlotLength
- slotLengthToMillisec :: SlotLength -> Integer
- slotLengthToSec :: SlotLength -> Integer
- data SlotLength
System time
newtype SystemStart Source #
System start
Slots are counted from the system start.
Constructors
SystemStart | |
Fields |
Instances
Relative time
newtype RelativeTime Source #
RelativeTime
is time relative to the
SystemStart
Constructors
RelativeTime | |
Fields |
Instances
addRelTime :: NominalDiffTime -> RelativeTime -> RelativeTime Source #
fromRelativeTime :: SystemStart -> RelativeTime -> UTCTime Source #
toRelativeTime :: SystemStart -> UTCTime -> RelativeTime Source #
Get current time (as
RelativeTime
)
data SystemTime m Source #
System time
Slots are counted from the system start.
Constructors
SystemTime | |
Fields
|
Instances
NoThunks ( SystemTime m) Source # | |
Slot length
mkSlotLength :: NominalDiffTime -> SlotLength Source #
Constructor for
SlotLength
Conversions
slotLengthToSec :: SlotLength -> Integer Source #
opaque
data SlotLength Source #
Slot length