Struct ExactTimestamp
- Namespace
- OpenShell
- Assembly
- OpenShell.Sdk.dll
A timestamp that keeps nanosecond precision, which DateTimeOffset cannot.
public readonly record struct ExactTimestamp : IEquatable<ExactTimestamp>
- Implements
- Inherited Members
Constructors
ExactTimestamp(long, int)
A timestamp that keeps nanosecond precision, which DateTimeOffset cannot.
public ExactTimestamp(long Seconds, int Nanos)
Parameters
Properties
Nanos
Nanoseconds within the second.
public int Nanos { get; init; }
Property Value
Seconds
Seconds since the Unix epoch.
public long Seconds { get; init; }
Property Value
Methods
ToDateTimeOffset()
Converts to a DateTimeOffset, truncating to 100 ns ticks.
public DateTimeOffset ToDateTimeOffset()