TimeSample structure (timeprov.h)
Represents a time sample.
Syntax
typedef struct TimeSample {
DWORD dwSize;
DWORD dwRefid;
signed __int64 toOffset;
signed __int64 toDelay;
unsigned __int64 tpDispersion;
unsigned __int64 nSysTickCount;
signed __int64 nSysPhaseOffset;
BYTE nLeapFlags;
BYTE nStratum;
DWORD dwTSFlags;
WCHAR wszUniqueName[256];
} TimeSample;
Members
dwSize
The size of the structure, in bytes.
dwRefid
A reference identifier for the time source, in NTP format (either an IP address or a four character ASCII string that describes the hardware source, such as GPS or WWVB).
toOffset
The difference between local and remote clocks, in (10^-7)s.
toDelay
The total roundtrip delay, in (10^-7)s. This is the time packets spent in transit from the root time source to the client, including root delay. For NTP providers, this means roundtrip delay to the peer, plus the peer's root delay. The hardware providers, this value is probably zero.
tpDispersion
The total measurement error of the clock offset, including root dispersion, in (10^-7)s. This includes errors in reading the local clock, uncertainty in the local clock frequency, and error from filters. For NTP providers, this includes the peer's root dispersion.
nSysTickCount
The value returned by GetTimeSysInfo with TSI_TickCount.
nSysPhaseOffset
The value returned by GetTimeSysInfo with TSI_PhaseOffset.
nLeapFlags
A variable that indicates an impending leap second or loss of synchronization. This member can be one of the following values.
Value | Meaning |
---|---|
|
No change. |
|
Add leap second. |
|
Subtract leap second. |
|
Not synchronized. |
nStratum
The number of network hops separating this computer from the root source. Hardware providers should return zero. NTP providers should return the stratum of the peer that provided the sample.
dwTSFlags
The information about the time source.
Value | Meaning |
---|---|
|
The sample has been cryptographically authenticated. |
|
The sample is from a hardware device such as a GPS or radio receiver. |
wszUniqueName[256]
The name that uniquely identifies the source of the sample. For network providers, the name should include the protocol and IP addresses. For hardware devices, the name should include the device name and communication port.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | timeprov.h |