timepoint
struct timepointAvailable without an import.
A sample from the monotonic clock. Its origin is unspecified; use timepoints for ordering and elapsed-time measurements, not calendar time. Subtract two timepoints to obtain a timespan.
Members
ElapsedSincemethod
public fn ElapsedSince(timepoint earlier) : timespanReturns this timepoint minus earlier as a signed duration. Use samples from the same runtime clock.
OffsetBymethod
public fn OffsetBy(timespan offset) : timepointReturns a timepoint shifted by the signed duration. Keep the result within the signed 64-bit clock range.
GetHashCodemethod
public fn GetHashCode() : uint32Hashes the stored clock sample.
Equalsmethod
public fn Equals(timepoint other) : boolTests exact clock-sample equality.
CompareTomethod
public fn CompareTo(timepoint other) : int32Returns -1, 0, or 1 for earlier, equal, or later samples.
ToStringmethod
public fn ToString() : stringFormats the clock sample as timepoint(...ns). The origin is unspecified and has no calendar meaning.
ToStringBuffermethod
public fn ToStringBuffer(StringBuilder builder) : int32Provided by the compiler.