cardano-slotting-0.2.0.0: Key slotting types for cardano libraries
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Slotting.Time

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

Generic SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

Associated Types

type Rep SystemStart ∷ Type → Type

Methods

fromSystemStart → Rep SystemStart x

to ∷ Rep SystemStart x → SystemStart

Show SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

Methods

showsPrec ∷ Int → SystemStart → ShowS

showSystemStart → String

showList ∷ [SystemStart] → ShowS

FromCBOR SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

Methods

fromCBORDecoder s SystemStart Source #

label ∷ Proxy SystemStart → Text Source #

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 #

Eq SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

Methods

(==)SystemStartSystemStart → Bool

(/=)SystemStartSystemStart → Bool

NoThunks SystemStart Source # 
Instance details

Defined in Cardano.Slotting.Time

Methods

noThunksContextSystemStart → IO (Maybe ThunkInfo) Source #

wNoThunksContextSystemStart → IO (Maybe ThunkInfo) Source #

showTypeOf ∷ Proxy SystemStart → String Source #

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.0.0-inplace" '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

Generic RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

Associated Types

type Rep RelativeTime ∷ Type → Type

Methods

fromRelativeTime → Rep RelativeTime x

to ∷ Rep RelativeTime x → RelativeTime

Show RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

Methods

showsPrec ∷ Int → RelativeTime → ShowS

showRelativeTime → String

showList ∷ [RelativeTime] → ShowS

FromCBOR RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

Methods

fromCBORDecoder s RelativeTime Source #

label ∷ Proxy RelativeTime → Text Source #

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

Methods

(==)RelativeTimeRelativeTime → Bool

(/=)RelativeTimeRelativeTime → Bool

Ord RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

NoThunks RelativeTime Source # 
Instance details

Defined in Cardano.Slotting.Time

Methods

noThunksContextRelativeTime → IO (Maybe ThunkInfo) Source #

wNoThunksContextRelativeTime → IO (Maybe ThunkInfo) Source #

showTypeOf ∷ Proxy RelativeTime → String Source #

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.0.0-inplace" 'True) (C1 ('MetaCons "RelativeTime" 'PrefixI 'True) (S1 ('MetaSel ('Just "getRelativeTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NominalDiffTime)))

multRelativeTime ∷ Integral f ⇒ RelativeTime → f → RelativeTime Source #

Nominal diff time

Slot length

Conversions

opaque

data SlotLength Source #

Slot length

Precision is in milliseconds

Instances

Instances details
Generic SlotLength Source # 
Instance details

Defined in Cardano.Slotting.Time

Associated Types

type Rep SlotLength ∷ Type → Type

Methods

fromSlotLength → Rep SlotLength x

to ∷ Rep SlotLength x → SlotLength

Show SlotLength Source # 
Instance details

Defined in Cardano.Slotting.Time

Methods

showsPrec ∷ Int → SlotLength → ShowS

showSlotLength → String

showList ∷ [SlotLength] → ShowS

FromCBOR SlotLength Source # 
Instance details

Defined in Cardano.Slotting.Time

Methods

fromCBORDecoder s SlotLength Source #

label ∷ Proxy SlotLength → Text Source #

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

(==)SlotLengthSlotLength → Bool

(/=)SlotLengthSlotLength → Bool

NoThunks SlotLength Source # 
Instance details

Defined in Cardano.Slotting.Time

Methods

noThunksContextSlotLength → IO (Maybe ThunkInfo) Source #

wNoThunksContextSlotLength → IO (Maybe ThunkInfo) Source #

showTypeOf ∷ Proxy SlotLength → String Source #

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.0.0-inplace" 'True) (C1 ('MetaCons "SlotLength" 'PrefixI 'True) (S1 ('MetaSel ('Just "getSlotLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 NominalDiffTime)))