Table of Contents

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

Seconds long

Seconds since the Unix epoch.

Nanos int

Nanoseconds within the second.

Properties

Nanos

Nanoseconds within the second.

public int Nanos { get; init; }

Property Value

int

Seconds

Seconds since the Unix epoch.

public long Seconds { get; init; }

Property Value

long

Methods

ToDateTimeOffset()

Converts to a DateTimeOffset, truncating to 100 ns ticks.

public DateTimeOffset ToDateTimeOffset()

Returns

DateTimeOffset