NtpTimestamp Struct
Namespace: Rebex.Net
Assembly: Rebex.Time.dll (version 7.0.9147)
NTP timestamp implementation for Ntp. This is a value type.
Syntax
public struct NtpTimestamp : IComparable
Implements
Inherited Members
Remarks
See RFC 1305 for the definition of the timestamp format.
Constructors
Name | Description |
---|---|
Ntp |
Constructs the timestamp from the raw NTP format. |
Ntp |
Constructs the timestamp from .NET time. |
Fields
Name | Description |
---|---|
Max |
Represents the largest possible value of NtpTimestamp. |
Min |
Represents the smallest possible value of NtpTimestamp. |
Properties
Name | Description |
---|---|
Is |
Minimal validity check according to RFC 1305. |
Microsecond | The sub-second part of the timestamp, on microsecond scale. |
Now | Gets the current system time. |
Methods
Name | Description |
---|---|
Add(Ntp |
Adds the specified time difference to this instance. |
Compare |
Compares this instance to a specified object and returns an indication of their relative values. |
Equals(Object) | Indicates whether the specified object is equal to the current object. |
Get |
Returns a hash code for this instance. |
Subtract(Ntp |
Subtracts the specified timestamp from this instance, calculating the time difference between the two timestamps. |
Subtract(Ntp |
Subtracts the specified time difference from this instance. |
To |
Accessor for the timestamp in NTP format. |
To |
Accessor for the timestamp in .NET time format. Converts to local time. |
To |
Converts the value of this instance to string representation (analogically to DateTime.ToString). |
To |
Accessor for the timestamp in .NET time format. |
To |
Accessor for the timestamp in Unix time format. |
Operators
Name | Description |
---|---|
Addition(Ntp |
Adds a time difference to a timestamp. |
Equality(Ntp |
Compare two instances of NtpTimestamp. |
Greater |
Indicates whether a specified NtpTimestamp is greater than another specified NtpTimestamp. |
Greater |
Indicates whether a specified NtpTimestamp is greater than or equal to another specified NtpTimestamp. |
Inequality(Ntp |
Compare two instances of NtpTimestamp. |
Less |
Indicates whether a specified NtpTimestamp is less than another specified NtpTimestamp. |
Less |
Indicates whether a specified NtpTimestamp is less than or equal to another specified NtpTimestamp. |
Subtraction(Ntp |
Subtracts a timestamp from a timestamp, calculating the time difference between the timestamps. |
Subtraction(Ntp |
Subtracts a time difference from a timestamp. |