Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.Slotting.Time
Synopsis
- newtype SystemStart = SystemStart { }
- newtype RelativeTime = RelativeTime { }
- addRelativeTime :: NominalDiffTime -> RelativeTime -> RelativeTime
- diffRelativeTime :: RelativeTime -> RelativeTime -> NominalDiffTime
- fromRelativeTime :: SystemStart -> RelativeTime -> UTCTime
- multRelativeTime :: Integral f => RelativeTime -> f -> RelativeTime
- toRelativeTime :: SystemStart -> UTCTime -> RelativeTime
- multNominalDiffTime :: Integral f => NominalDiffTime -> f -> NominalDiffTime
- 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
fromRelativeTime :: SystemStart -> RelativeTime -> UTCTime Source #
multRelativeTime :: Integral f => RelativeTime -> f -> RelativeTime Source #
toRelativeTime :: SystemStart -> UTCTime -> RelativeTime Source #
Nominal diff time
multNominalDiffTime :: Integral f => NominalDiffTime -> f -> NominalDiffTime Source #
Slot length
mkSlotLength :: NominalDiffTime -> SlotLength Source #
Constructor for
SlotLength
Conversions
slotLengthToSec :: SlotLength -> Integer Source #
opaque
data SlotLength Source #
Slot length