Ordinal
represents a bounded value for milliseconds, ranging from 0 to 999 milliseconds.
Equations
Instances For
Equations
- Std.Time.Millisecond.instOfNatOrdinal = inferInstanceAs (OfNat (Std.Time.Internal.Bounded.LE 0 (0 + ↑999)) n)
Equations
- Std.Time.Millisecond.instInhabitedOrdinal = { default := 0 }
Equations
- Std.Time.Millisecond.instDecidableLeOrdinal = inferInstanceAs (Decidable (x.val ≤ y.val))
Equations
- Std.Time.Millisecond.instDecidableLtOrdinal = inferInstanceAs (Decidable (x.val < y.val))
Equations
- Std.Time.Millisecond.instOfNatOffset = { ofNat := Std.Time.Internal.UnitVal.ofNat n }
@[inline]
Creates an Offset
from a natural number.
Equations
- Std.Time.Millisecond.Offset.ofNat data = { val := ↑data }
Instances For
@[inline]
Creates an Offset
from an integer.
Equations
- Std.Time.Millisecond.Offset.ofInt data = { val := data }
Instances For
@[inline]
Creates an Ordinal
from a natural number, ensuring the value is within bounds.
Equations
Instances For
@[inline]
Converts an Ordinal
to an Offset
.
Equations
- ordinal.toOffset = { val := ordinal.val }