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 #
Constructors
SystemStart | |
Fields |
Instances
Relative time
newtype RelativeTime #
Constructors
RelativeTime | |
Fields |
Instances
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 # | |
Defined in Ouroboros.Consensus.BlockchainTime.WallClock.Types Methods noThunks ∷ Context → SystemTime m → IO (Maybe ThunkInfo) # wNoThunks ∷ Context → SystemTime m → IO (Maybe ThunkInfo) # showTypeOf ∷ Proxy (SystemTime m) → String # |
Slot length
Conversions
opaque
data SlotLength #
Instances
Eq SlotLength | |
Defined in Cardano.Slotting.Time | |
Show SlotLength | |
Defined in Cardano.Slotting.Time | |
Generic SlotLength | |
Defined in Cardano.Slotting.Time | |
NoThunks SlotLength | |
Defined in Cardano.Slotting.Time Methods noThunks ∷ Context → SlotLength → IO (Maybe ThunkInfo) # wNoThunks ∷ Context → SlotLength → IO (Maybe ThunkInfo) # showTypeOf ∷ Proxy SlotLength → String # | |
Serialise SlotLength | |
Defined in Cardano.Slotting.Time Methods encode ∷ SlotLength → Encoding decode ∷ Decoder s SlotLength encodeList ∷ [SlotLength] → Encoding decodeList ∷ Decoder s [SlotLength] | |
type Rep SlotLength | |
Defined in Cardano.Slotting.Time type Rep SlotLength = D1 ('MetaData "SlotLength" "Cardano.Slotting.Time" "cardano-slotting-0.1.0.2-74c448355b68a61c6cad9091e665a0701ccb235b18ea481722bf9e6cd42d11d8" 'True) (C1 ('MetaCons "SlotLength" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSlotLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NominalDiffTime))) |