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

Ouroboros.Consensus.BlockchainTime.WallClock.Types

Synopsis

System time

newtype SystemStart Source #

System start

Slots are counted from the system start.

Constructors

SystemStart 

Instances

Instances details
FromJSON SystemStart 
Instance details

Defined in Cardano.Slotting.Time

ToJSON SystemStart 
Instance details

Defined in Cardano.Slotting.Time

FromCBOR SystemStart 
Instance details

Defined in Cardano.Slotting.Time

ToCBOR SystemStart 
Instance details

Defined in Cardano.Slotting.Time

Methods

toCBORSystemStartEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SystemStartSize Source #

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

EncCBOR SystemStart 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Methods

encCBORSystemStartEncoding Source #

encodedSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy SystemStartSize Source #

encodedListSizeExpr ∷ (∀ t. EncCBOR t ⇒ Proxy t → Size) → Proxy [SystemStart] → Size Source #

Generic SystemStart 
Instance details

Defined in Cardano.Slotting.Time

Associated Types

type Rep SystemStart 
Instance details

Defined in Cardano.Slotting.Time

type Rep SystemStart = D1 ('MetaData "SystemStart" "Cardano.Slotting.Time" "cardano-slotting-0.2.0.0-2b12715306b9f8011dcd1a9abda3c9a87b5af2551395e7f7113557ad264b8ac9" 'True) (C1 ('MetaCons "SystemStart" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSystemStart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime)))
Show SystemStart 
Instance details

Defined in Cardano.Slotting.Time

Eq SystemStart 
Instance details

Defined in Cardano.Slotting.Time

NoThunks SystemStart 
Instance details

Defined in Cardano.Slotting.Time

Serialise SystemStart 
Instance details

Defined in Cardano.Slotting.Time

type Rep SystemStart 
Instance details

Defined in Cardano.Slotting.Time

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

Relative time

newtype RelativeTime Source #

RelativeTime is time relative to the SystemStart

Precision is in picoseconds

Instances

Instances details
FromJSON RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

ToJSON RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

FromCBOR RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

ToCBOR RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

Methods

toCBORRelativeTimeEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy RelativeTimeSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [RelativeTime] → Size Source #

Generic RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

Associated Types

type Rep RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

type Rep RelativeTime = D1 ('MetaData "RelativeTime" "Cardano.Slotting.Time" "cardano-slotting-0.2.0.0-2b12715306b9f8011dcd1a9abda3c9a87b5af2551395e7f7113557ad264b8ac9" 'True) (C1 ('MetaCons "RelativeTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "getRelativeTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NominalDiffTime)))
Show RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

Eq RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

Ord RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

NoThunks RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

Serialise RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

type Rep RelativeTime 
Instance details

Defined in Cardano.Slotting.Time

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

Get current time (as RelativeTime)

data SystemTime (m ∷ TypeType) Source #

System time

Slots are counted from the system start.

Constructors

SystemTime 

Fields

Slot length

Conversions

opaque

data SlotLength Source #

Slot length

Precision is in milliseconds

Instances

Instances details
FromCBOR SlotLength 
Instance details

Defined in Cardano.Slotting.Time

ToCBOR SlotLength 
Instance details

Defined in Cardano.Slotting.Time

Methods

toCBORSlotLengthEncoding Source #

encodedSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy SlotLengthSize Source #

encodedListSizeExpr ∷ (∀ t. ToCBOR t ⇒ Proxy t → Size) → Proxy [SlotLength] → Size Source #

Generic SlotLength 
Instance details

Defined in Cardano.Slotting.Time

Associated Types

type Rep SlotLength 
Instance details

Defined in Cardano.Slotting.Time

type Rep SlotLength = D1 ('MetaData "SlotLength" "Cardano.Slotting.Time" "cardano-slotting-0.2.0.0-2b12715306b9f8011dcd1a9abda3c9a87b5af2551395e7f7113557ad264b8ac9" 'True) (C1 ('MetaCons "SlotLength" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSlotLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NominalDiffTime)))
Show SlotLength 
Instance details

Defined in Cardano.Slotting.Time

Eq SlotLength 
Instance details

Defined in Cardano.Slotting.Time

Methods

(==)SlotLengthSlotLengthBool #

(/=)SlotLengthSlotLengthBool #

NoThunks SlotLength 
Instance details

Defined in Cardano.Slotting.Time

Serialise SlotLength 
Instance details

Defined in Cardano.Slotting.Time

type Rep SlotLength 
Instance details

Defined in Cardano.Slotting.Time

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