NtpResponse class

Represents a detailed response from an NTP synchronization query.

Contains the compensated dateTime along with full RFC 5905 telemetry such as offset, roundTripDelay, stratum, leapIndicator, rootDelay, rootDispersion, and referenceId.

Constructors

NtpResponse({required DateTime dateTime, required Duration offset, required Duration roundTripDelay, required String server, int stratum = 1, int leapIndicator = 0, String? referenceId, Duration rootDelay = Duration.zero, Duration rootDispersion = Duration.zero})
Creates an immutable NtpResponse instance.
const

Properties

dateTime → DateTime
The accurate, latency-compensated time.
final
hashCode → int
The hash code for this object.
no setterinherited
leapIndicator → int
The leap second indicator (0 = no warning, 1 = +1s, 2 = -1s).
final
offset → Duration
The clock offset ($\theta$) between the server and the local device clock (serverTime - localTime).
final
referenceId → String?
The 4-character ASCII reference identifier (for stratum 1, e.g. 'GOOG', 'GPS') or IPv4 reference address string (for stratum >= 2).
final
rootDelay → Duration
The total round-trip delay to the primary reference source.
final
rootDispersion → Duration
The maximum error relative to the primary reference source.
final
roundTripDelay → Duration
The net network round-trip delay ($\delta$).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
server → String
The server hostname, IP, or API endpoint that provided the response.
final
stratum → int
The NTP server stratum level (1 = primary reference, 2–15 = secondary).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited