Struct PackedTimeSpan48
- Namespace
- Typhon.Schema.Definition
- Assembly
- Typhon.Schema.Definition.dll
A 6-byte (48-bit) packed TimeSpan: the tick count shifted right by PackedShift bits, giving ~102.4 µs resolution over a much wider range than PackedTimeSpan32. Durations outside [MinValue, MaxValue] are not representable.
public readonly struct PackedTimeSpan48
- Inherited Members
Constructors
PackedTimeSpan48(long, bool)
Constructs from either packed or unpacked ticks.
public PackedTimeSpan48(long value, bool isPacked)
Parameters
valuelongPacked ticks when
isPackedistrue, otherwise unpacked TimeSpan ticks.isPackedbooltrueifvalueis already packed;falseto pack it.
PackedTimeSpan48(TimeSpan)
Packs the given timeSpan.
public PackedTimeSpan48(TimeSpan timeSpan)
Parameters
Fields
MaxValue
Largest representable duration.
public static readonly TimeSpan MaxValue
Field Value
MinValue
Smallest (most negative) representable duration.
public static readonly TimeSpan MinValue
Field Value
Properties
Ticks
The unpacked TimeSpan tick count (precision PackedTickResolution).
public long Ticks { get; }
Property Value
Methods
ToString()
Formats the unpacked duration via ToString().
public override string ToString()
Returns
Operators
explicit operator TimeSpan(PackedTimeSpan48)
Unpacks to a TimeSpan.
public static explicit operator TimeSpan(PackedTimeSpan48 packed)
Parameters
packedPackedTimeSpan48