DotNext by .NET Foundation and Contributors

<PackageReference Include="DotNext" Version="4.4.1" />

 Timestamp

Represents timestamp.
public static Timestamp Current { get; }

Gets the current point in time.

public TimeSpan Elapsed { get; }

Gets precise difference between the current point in time and this timestamp.

public bool IsEmpty { get; }

Gets a value indicating that the timestamp is zero.

public bool IsFuture { get; }

Gets a value indcating that the current timestamp represents the future point in time.

public bool IsPast { get; }

Gets a value indcating that the current timestamp represents the past point in time.

public TimeSpan Value { get; }

Gets TimeSpan representing this timestamp.

public Timestamp()

Captures the current point in time.

Adds the specified duration to the timestamp.

public static bool op_Equality(Timestamp first, Timestamp second)

Determines whether the two timestamps are equal.

public static bool op_GreaterThan(Timestamp first, Timestamp second)

Determines whether the first timestamp is greater than the second.

public static bool op_GreaterThanOrEqual(Timestamp first, Timestamp second)

Determines whether the first timestamp is greater than or equal to the second.

public static TimeSpan op_Implicit(Timestamp stamp)

Gets TimeSpan representing the given timestamp.

public static bool op_Inequality(Timestamp first, Timestamp second)

Determines whether the two timestamps are equal.

public static bool op_LessThan(Timestamp first, Timestamp second)

Determines whether the first timestamp is less than the second.

public static bool op_LessThanOrEqual(Timestamp first, Timestamp second)

Determines whether the first timestamp is less than or equal to the second.

Subtracts the specified duration from the timestamp.

public static void Refresh(ref Timestamp location)

Updates the timestamp to the current point in time and prevents the proces from reordering memory operations.

public static Timestamp VolatileRead(ref Timestamp location)

Reads the timestamp and prevents the processor from reordering memory operations.

public static void VolatileWrite(ref Timestamp location, Timestamp newValue)

Writes the timestamp and prevents the proces from reordering memory operations.

public int CompareTo(Timestamp other)

Compares this timestamp with the given value.

public bool Equals(Timestamp other)

Determines whether the current timestamp equals to the specified timestamp.