NtpMeasurementOptions Class

Configuration options for NtpClient.MeasureAsync and NtpClient.MeasureAsync.

public sealed class NtpMeasurementOptions

Constructors

NameDescription
NtpMeasurementOptions()

NtpMeasurementOptions()

NtpMeasurementOptions.cs
public NtpMeasurementOptions()

No documentation is available.

Properties

NameDescription
SampleCountGets or sets the number of queries sent to each server. Default is 4.
SampleIntervalGets or sets the delay between two queries to the same server. Default is 2 seconds.

Gets or sets the number of queries sent to each server. Default is 4.

public int SampleCount { get; set; }

Property value

int

Exceptions

ArgumentOutOfRangeException
The value is less than 1.

Remarks

The sample with the shortest round-trip delay is the most accurate: the more samples, the more likely one of them had no queuing delay. RFC 5905 keeps the last 8.

Gets or sets the delay between two queries to the same server. Default is 2 seconds.

public TimeSpan SampleInterval { get; set; }

Property value

TimeSpan

Exceptions

ArgumentOutOfRangeException
The value is negative.

Remarks

Public NTP servers rate-limit their clients: a burst of queries without delay can get a RATE Kiss-o'-Death reply. The 2 seconds of the default are what ntpd uses for its initial burst.