Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 Source #
System start
Slots are counted from the system start.
Instances
Relative time
newtype RelativeTime Source #
RelativeTime
is time relative to the
SystemStart
Instances
addRelTime :: NominalDiffTime -> RelativeTime -> RelativeTime Source #
fromRelativeTime :: SystemStart -> RelativeTime -> UTCTime Source #
toRelativeTime :: SystemStart -> UTCTime -> RelativeTime Source #
Get current time (as
RelativeTime
)
data SystemTime m Source #
System time
Slots are counted from the system start.
SystemTime | |
|
Instances
NoThunks ( SystemTime m) Source # | |
Slot length
mkSlotLength :: NominalDiffTime -> SlotLength Source #
Constructor for
SlotLength
Conversions
slotLengthToSec :: SlotLength -> Integer Source #
opaque
data SlotLength Source #
Slot length
Instances
Eq SlotLength | |
Defined in Cardano.Slotting.Time (==) :: SlotLength -> SlotLength -> Bool Source # (/=) :: SlotLength -> SlotLength -> Bool Source # |
|
Show SlotLength | |
Defined in Cardano.Slotting.Time |
|
Generic SlotLength | |
Defined in Cardano.Slotting.Time from :: SlotLength -> Rep SlotLength x Source # to :: Rep SlotLength x -> SlotLength Source # |
|
NoThunks SlotLength | |
Defined in Cardano.Slotting.Time |
|
Serialise SlotLength | |
Defined in Cardano.Slotting.Time encode :: SlotLength -> Encoding Source # decode :: Decoder s SlotLength Source # encodeList :: [ SlotLength ] -> Encoding Source # decodeList :: Decoder s [ SlotLength ] Source # |
|
type Rep SlotLength | |
Defined in Cardano.Slotting.Time
type
Rep
SlotLength
=
D1
('
MetaData
"SlotLength" "Cardano.Slotting.Time" "cardano-slotting-0.1.0.2-j5NuF73p5IFfcfvmth6tS" '
True
) (
C1
('
MetaCons
"SlotLength" '
PrefixI
'
True
) (
S1
('
MetaSel
('
Just
"getSlotLength") '
NoSourceUnpackedness
'
NoSourceStrictness
'
DecidedLazy
) (
Rec0
NominalDiffTime
)))
|