Rebex
Products Downloads Buy Support Contact
Show / Hide Table of Contents

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
IComparable
Inherited Members
Object.Equals(Object, Object)
Object.GetType()
Object.ReferenceEquals(Object, Object)

Remarks

See RFC 1305 for the definition of the timestamp format.

Constructors

Name Description
NtpTimestamp(Byte[], Int32)

Constructs the timestamp from the raw NTP format.

NtpTimestamp(DateTime)

Constructs the timestamp from .NET time.

Fields

Name Description
MaxValue

Represents the largest possible value of NtpTimestamp.

MinValue

Represents the smallest possible value of NtpTimestamp.

Properties

Name Description
IsValid

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(NtpTimestampDifference)

Adds the specified time difference to this instance.

CompareTo(Object)

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.

GetHashCode()

Returns a hash code for this instance.

Subtract(NtpTimestamp)

Subtracts the specified timestamp from this instance, calculating the time difference between the two timestamps.

Subtract(NtpTimestampDifference)

Subtracts the specified time difference from this instance.

ToArray()

Accessor for the timestamp in NTP format.

ToLocalTime()

Accessor for the timestamp in .NET time format. Converts to local time.

ToString()

Converts the value of this instance to string representation (analogically to DateTime.ToString).

ToUniversalTime()

Accessor for the timestamp in .NET time format.

ToUnixTime()

Accessor for the timestamp in Unix time format.

Operators

Name Description
Addition(NtpTimestamp, NtpTimestampDifference)

Adds a time difference to a timestamp.

Equality(NtpTimestamp, NtpTimestamp)

Compare two instances of NtpTimestamp.

GreaterThan(NtpTimestamp, NtpTimestamp)

Indicates whether a specified NtpTimestamp is greater than another specified NtpTimestamp.

GreaterThanOrEqual(NtpTimestamp, NtpTimestamp)

Indicates whether a specified NtpTimestamp is greater than or equal to another specified NtpTimestamp.

Inequality(NtpTimestamp, NtpTimestamp)

Compare two instances of NtpTimestamp.

LessThan(NtpTimestamp, NtpTimestamp)

Indicates whether a specified NtpTimestamp is less than another specified NtpTimestamp.

LessThanOrEqual(NtpTimestamp, NtpTimestamp)

Indicates whether a specified NtpTimestamp is less than or equal to another specified NtpTimestamp.

Subtraction(NtpTimestamp, NtpTimestamp)

Subtracts a timestamp from a timestamp, calculating the time difference between the timestamps.

Subtraction(NtpTimestamp, NtpTimestampDifference)

Subtracts a time difference from a timestamp.

In This Article
  • Remarks
  • Constructors
  • Fields
  • Properties
  • Methods
  • Operators
© REBEX ČR s.r.o. Back to top
Privacy policy
Manage cookies