← Standard library

timepoint

struct timepoint

Available 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.

Timepoint.wax:7

Members

ElapsedSincemethod

public fn ElapsedSince(timepoint earlier) : timespan

Returns this timepoint minus earlier as a signed duration. Use samples from the same runtime clock.

Timepoint.wax:19

OffsetBymethod

public fn OffsetBy(timespan offset) : timepoint

Returns a timepoint shifted by the signed duration. Keep the result within the signed 64-bit clock range.

Timepoint.wax:27

GetHashCodemethod

public fn GetHashCode() : uint32

Hashes the stored clock sample.

Timepoint.wax:34

Equalsmethod

public fn Equals(timepoint other) : bool

Tests exact clock-sample equality.

Timepoint.wax:41

CompareTomethod

public fn CompareTo(timepoint other) : int32

Returns -1, 0, or 1 for earlier, equal, or later samples.

Timepoint.wax:48

ToStringmethod

public fn ToString() : string

Formats the clock sample as timepoint(...ns). The origin is unspecified and has no calendar meaning.

Timepoint.wax:58

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.