ouroboros-consensus-0.1.0.0: Consensus layer for the Ouroboros blockchain protocol
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.BlockchainTime.WallClock.Types

Synopsis

System time

newtype SystemStart #

Constructors

SystemStart 

Instances

Instances details
Eq SystemStart 
Instance details

Defined in Cardano.Slotting.Time

Show SystemStart 
Instance details

Defined in Cardano.Slotting.Time

Generic SystemStart 
Instance details

Defined in Cardano.Slotting.Time

Associated Types

type Rep SystemStartTypeType Source #

Serialise SystemStart 
Instance details

Defined in Cardano.Slotting.Time

Methods

encodeSystemStart → Encoding #

decode ∷ Decoder s SystemStart #

encodeList ∷ [SystemStart] → Encoding #

decodeList ∷ Decoder s [SystemStart] #

NoThunks SystemStart 
Instance details

Defined in Cardano.Slotting.Time

Methods

noThunks ∷ Context → SystemStartIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → SystemStartIO (Maybe ThunkInfo) #

showTypeOfProxy SystemStartString #

FromCBOR SystemStart 
Instance details

Defined in Cardano.Slotting.Time

Methods

fromCBOR ∷ Decoder s SystemStart

labelProxy SystemStartText

ToCBOR SystemStart 
Instance details

Defined in Cardano.Slotting.Time

Methods

toCBORSystemStart → Encoding

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SystemStart → Size

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [SystemStart] → Size

type Rep SystemStart 
Instance details

Defined in Cardano.Slotting.Time

type Rep SystemStart = D1 ('MetaData "SystemStart" "Cardano.Slotting.Time" "cardano-slotting-0.1.0.0-0d44f65cb9561765b48fdba2b66a0b633a4e95aca59cab56ad2b70ffb4013db6" 'True) (C1 ('MetaCons "SystemStart" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSystemStart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime)))

Relative time

newtype RelativeTime #

Instances

Instances details
Eq RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

Ord RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

Show RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

Generic RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

Associated Types

type Rep RelativeTimeTypeType Source #

Serialise RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

Methods

encodeRelativeTime → Encoding #

decode ∷ Decoder s RelativeTime #

encodeList ∷ [RelativeTime] → Encoding #

decodeList ∷ Decoder s [RelativeTime] #

NoThunks RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

Methods

noThunks ∷ Context → RelativeTimeIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → RelativeTimeIO (Maybe ThunkInfo) #

showTypeOfProxy RelativeTimeString #

type Rep RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

type Rep RelativeTime = D1 ('MetaData "RelativeTime" "Cardano.Slotting.Time" "cardano-slotting-0.1.0.0-0d44f65cb9561765b48fdba2b66a0b633a4e95aca59cab56ad2b70ffb4013db6" 'True) (C1 ('MetaCons "RelativeTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "getRelativeTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NominalDiffTime)))

Get current time (as RelativeTime)

data SystemTime m Source #

System time

Slots are counted from the system start.

Constructors

SystemTime 

Fields

Instances

Instances details
NoThunks (SystemTime m) Source # 
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.WallClock.Types

Methods

noThunks ∷ Context → SystemTime m → IO (Maybe ThunkInfo) #

wNoThunks ∷ Context → SystemTime m → IO (Maybe ThunkInfo) #

showTypeOfProxy (SystemTime m) → String #

Slot length

Conversions

opaque

data SlotLength #

Instances

Instances details
Eq SlotLength 
Instance details

Defined in Cardano.Slotting.Time

Show SlotLength 
Instance details

Defined in Cardano.Slotting.Time

Generic SlotLength 
Instance details

Defined in Cardano.Slotting.Time

Associated Types

type Rep SlotLengthTypeType Source #

Serialise SlotLength 
Instance details

Defined in Cardano.Slotting.Time

Methods

encodeSlotLength → Encoding #

decode ∷ Decoder s SlotLength #

encodeList ∷ [SlotLength] → Encoding #

decodeList ∷ Decoder s [SlotLength] #

NoThunks SlotLength 
Instance details

Defined in Cardano.Slotting.Time

Methods

noThunks ∷ Context → SlotLengthIO (Maybe ThunkInfo) #

wNoThunks ∷ Context → SlotLengthIO (Maybe ThunkInfo) #

showTypeOfProxy SlotLengthString #

type Rep SlotLength 
Instance details

Defined in Cardano.Slotting.Time

type Rep SlotLength = D1 ('MetaData "SlotLength" "Cardano.Slotting.Time" "cardano-slotting-0.1.0.0-0d44f65cb9561765b48fdba2b66a0b633a4e95aca59cab56ad2b70ffb4013db6" 'True) (C1 ('MetaCons "SlotLength" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSlotLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NominalDiffTime)))