Show / Hide Table of Contents

Struct Timestamp

Represents timestamp.

Implements
IEquatable<Timestamp>
IComparable<Timestamp>
Namespace: DotNext.Diagnostics
Assembly: DotNext.dll
Syntax
public struct Timestamp : IEquatable<Timestamp>, IComparable<Timestamp>
Remarks

This class can be used as allocation-free alternative to .

Properties

| Improve this Doc View Source

Current

Gets current point in time.

Declaration
public static Timestamp Current { get; }
Property Value
Type Description
Timestamp
| Improve this Doc View Source

Elapsed

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

Declaration
public TimeSpan Elapsed { get; }
Property Value
Type Description
TimeSpan
| Improve this Doc View Source

Value

Gets representing this timestamp.

Declaration
public TimeSpan Value { get; }
Property Value
Type Description
TimeSpan

Methods

| Improve this Doc View Source

CompareTo(Timestamp)

Compares this timestamp with the given value.

Declaration
public int CompareTo(Timestamp other)
Parameters
Type Name Description
Timestamp other

The timestamp to compare.

Returns
Type Description
Int32

The result of comparison.

| Improve this Doc View Source

Equals(Timestamp)

Determines whether the current timestamp equals to the specified timestamp.

Declaration
public bool Equals(Timestamp other)
Parameters
Type Name Description
Timestamp other

The timestamp to compare.

Returns
Type Description
Boolean

true if this timestamp is equal to other; otherwise, false.

| Improve this Doc View Source

Equals(Object)

Determines whether the current timestamp equals to the specified timestamp.

Declaration
public override bool Equals(object other)
Parameters
Type Name Description
Object other

The timestamp to compare.

Returns
Type Description
Boolean

true if this timestamp is equal to other; otherwise, false.

| Improve this Doc View Source

GetHashCode()

Computes hash code for this timestamp.

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

The hash code of this timestamp.

| Improve this Doc View Source

ToString()

Gets timestamp in the form of the string.

Declaration
public override string ToString()
Returns
Type Description
String

The string representing this timestamp.

Operators

| Improve this Doc View Source

Equality(Timestamp, Timestamp)

Determines whether the two timestamps are equal.

Declaration
public static bool operator ==(Timestamp first, Timestamp second)
Parameters
Type Name Description
Timestamp first

The first timestamp to compare.

Timestamp second

The second timestamp to compare.

Returns
Type Description
Boolean

true if both timestamps are equal; otherwise, false.

| Improve this Doc View Source

GreaterThan(Timestamp, Timestamp)

Determines whether the first timestamp is greater than the second.

Declaration
public static bool operator>(Timestamp first, Timestamp second)
Parameters
Type Name Description
Timestamp first

The first timestamp to compare.

Timestamp second

The second timestamp to compare.

Returns
Type Description
Boolean

true if first is greater than second.

| Improve this Doc View Source

GreaterThanOrEqual(Timestamp, Timestamp)

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

Declaration
public static bool operator >=(Timestamp first, Timestamp second)
Parameters
Type Name Description
Timestamp first

The first timestamp to compare.

Timestamp second

The second timestamp to compare.

Returns
Type Description
Boolean

true if first is greater than or equal to second.

| Improve this Doc View Source

Implicit(Timestamp to TimeSpan)

Gets representing the given timestamp.

Declaration
public static implicit operator TimeSpan(Timestamp stamp)
Parameters
Type Name Description
Timestamp stamp

The timestamp to convert.

Returns
Type Description
TimeSpan
| Improve this Doc View Source

Inequality(Timestamp, Timestamp)

Determines whether the two timestamps are equal.

Declaration
public static bool operator !=(Timestamp first, Timestamp second)
Parameters
Type Name Description
Timestamp first

The first timestamp to compare.

Timestamp second

The second timestamp to compare.

Returns
Type Description
Boolean

false if both timestamps are equal; otherwise, true.

| Improve this Doc View Source

LessThan(Timestamp, Timestamp)

Determines whether the first timestamp is less than the second.

Declaration
public static bool operator <(Timestamp first, Timestamp second)
Parameters
Type Name Description
Timestamp first

The first timestamp to compare.

Timestamp second

The second timestamp to compare.

Returns
Type Description
Boolean

true if first is less than second.

| Improve this Doc View Source

LessThanOrEqual(Timestamp, Timestamp)

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

Declaration
public static bool operator <=(Timestamp first, Timestamp second)
Parameters
Type Name Description
Timestamp first

The first timestamp to compare.

Timestamp second

The second timestamp to compare.

Returns
Type Description
Boolean

true if first is less than or equal to second.

Implements

IEquatable<>
IComparable<>

Extension Methods

ExpressionBuilder.Const<T>(T)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX