Packet Sniffer SDK DLL Edition

HNPacket :: Methods :: PktGetTimeStamp

 Previous Next

Returns the time of the packet receiving.

Syntax:

DWORD __stdcall PktGetTimeStamp(HANDLE hPkt, DWORD *HiValue);

Parameters:

hPkt

[in] HNPacket object handle.

HiValue

[out] The pointer to the variable, in which the high DWORD of the result will be stored. May be set to NULL if the application does not need these data.

Return values:

If the function succeeds the return value will be the low-order doubleword of the time of the packet receiving, and if HiValue is non-NULL, the function will put the high-order doubleword of this number into the variable pointed to by this parameter.

Description:

Use PktGetTimeStamp to get the time of the packet receiving. For Windows NT 4.0/2000/XP/Vista it is equal to hundreds of nanoseconds since January 1, 1601, and for Windows 95/98/ME it is equal to 0.8 microseconds since Windows session is started.

If UseHighPrecisionTime property is set to TRUE, then in Windows NT based systems (NT/2k/XP/2k3/Vista) for obtaining a packet capture timestamp the kernel function KeQueryPerformanceCounter is used. Measurement units are hundreds of nanoseconds since the OS was restarted.

See also:PktGetId, PktSetTimeStamp, AdpGetUseHighPrecisionTime