ouroboros-consensus
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 Source # 
Instance details

Defined in Cardano.Slotting.Time

ToJSON SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

FromCBOR SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

ToCBOR SystemStart Source # 
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 Source # 
Instance details

Defined in Cardano.Ledger.Binary.Encoding.EncCBOR

Eq SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

Generic SystemStart Source # 
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.1.0-e32c106a26359392be40ab0d528976b22065c041ee7f25eb107e1721327eb0c7" 'True) (C1 ('MetaCons "SystemStart" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSystemStart") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 UTCTime)))
Show SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

NoThunks SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

Serialise SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

type Rep SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

type Rep SystemStart = D1 ('MetaData "SystemStart" "Cardano.Slotting.Time" "cardano-slotting-0.2.1.0-e32c106a26359392be40ab0d528976b22065c041ee7f25eb107e1721327eb0c7" '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 Source # 
Instance details

Defined in Cardano.Slotting.Time

ToJSON RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

FromCBOR RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

ToCBOR RelativeTime Source # 
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 #

Eq RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

Ord RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

Generic RelativeTime Source # 
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.1.0-e32c106a26359392be40ab0d528976b22065c041ee7f25eb107e1721327eb0c7" 'True) (C1 ('MetaCons "RelativeTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "getRelativeTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NominalDiffTime)))
Show RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

NoThunks RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

Serialise RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

type Rep RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

type Rep RelativeTime = D1 ('MetaData "RelativeTime" "Cardano.Slotting.Time" "cardano-slotting-0.2.1.0-e32c106a26359392be40ab0d528976b22065c041ee7f25eb107e1721327eb0c7" '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

Attach an arrival time (as RelativeTime) to an object

data WithArrivalTime a Source #

WithArrivalTime

Constructors

WithArrivalTime 

Fields

Instances

Instances details
Eq a ⇒ Eq (WithArrivalTime a) Source # 
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.WallClock.Types

Ord a ⇒ Ord (WithArrivalTime a) Source # 
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.WallClock.Types

Generic (WithArrivalTime a) Source # 
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.WallClock.Types

Associated Types

type Rep (WithArrivalTime a) 
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.WallClock.Types

type Rep (WithArrivalTime a) = D1 ('MetaData "WithArrivalTime" "Ouroboros.Consensus.BlockchainTime.WallClock.Types" "ouroboros-consensus-3.0.1.0-inplace" 'False) (C1 ('MetaCons "WithArrivalTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "getArrivalTime") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RelativeTime) :*: S1 ('MetaSel ('Just "forgetArrivalTime") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))
Show a ⇒ Show (WithArrivalTime a) Source # 
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.WallClock.Types

NoThunks a ⇒ NoThunks (WithArrivalTime a) Source # 
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.WallClock.Types

HasPerasCertBoost cert ⇒ HasPerasCertBoost (WithArrivalTime cert) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsPeras

HasPerasCertRound cert ⇒ HasPerasCertRound (WithArrivalTime cert) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsPeras

HasPerasVoteRound vote ⇒ HasPerasVoteRound (WithArrivalTime vote) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsPeras

HasPerasVoteStake vote ⇒ HasPerasVoteStake (WithArrivalTime vote) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsPeras

HasPerasVoteVoterId vote ⇒ HasPerasVoteVoterId (WithArrivalTime vote) Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsPeras

HasPerasCertBoostedBlock cert blk ⇒ HasPerasCertBoostedBlock (WithArrivalTime cert) blk Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsPeras

HasPerasVoteBlock vote blk ⇒ HasPerasVoteBlock (WithArrivalTime vote) blk Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsPeras

HasPerasVoteId vote blk ⇒ HasPerasVoteId (WithArrivalTime vote) blk Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsPeras

HasPerasVoteTarget vote blk ⇒ HasPerasVoteTarget (WithArrivalTime vote) blk Source # 
Instance details

Defined in Ouroboros.Consensus.Block.SupportsPeras

type Rep (WithArrivalTime a) Source # 
Instance details

Defined in Ouroboros.Consensus.BlockchainTime.WallClock.Types

type Rep (WithArrivalTime a) = D1 ('MetaData "WithArrivalTime" "Ouroboros.Consensus.BlockchainTime.WallClock.Types" "ouroboros-consensus-3.0.1.0-inplace" 'False) (C1 ('MetaCons "WithArrivalTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "getArrivalTime") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RelativeTime) :*: S1 ('MetaSel ('Just "forgetArrivalTime") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 a)))

addArrivalTimeMonad m ⇒ SystemTime m → a → m (WithArrivalTime a) Source #

Add an arrival time to an object

Slot length

Conversions

opaque

data SlotLength Source #

Slot length

Precision is in milliseconds

Instances

Instances details
FromCBOR SlotLength Source # 
Instance details

Defined in Cardano.Slotting.Time

ToCBOR SlotLength Source # 
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 #

Eq SlotLength Source # 
Instance details

Defined in Cardano.Slotting.Time

Methods

(==)SlotLengthSlotLengthBool #

(/=)SlotLengthSlotLengthBool #

Generic SlotLength Source # 
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.1.0-e32c106a26359392be40ab0d528976b22065c041ee7f25eb107e1721327eb0c7" 'True) (C1 ('MetaCons "SlotLength" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSlotLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NominalDiffTime)))
Show SlotLength Source # 
Instance details

Defined in Cardano.Slotting.Time

NoThunks SlotLength Source # 
Instance details

Defined in Cardano.Slotting.Time

Serialise SlotLength Source # 
Instance details

Defined in Cardano.Slotting.Time

type Rep SlotLength Source # 
Instance details

Defined in Cardano.Slotting.Time

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