NetUtil_TS_Get
Get the current Internet Timestamp.
Files
net_util.h/net_bsp.c
Prototype
NET_TS NetUtil_TS_Get (void);
Arguments
None.
Returned Value
Current Internet Timestamp, if available;
NET_TS_NONE
, otherwise.
Required Configuration
None.
Notes / Warnings
RFC #791, Section 3.1 ‘Options: Internet Timestamp’ states that “the [Internet] Timestamp is a right-justified, 32-bit timestamp in milliseconds since midnight UT [Universal Time]”.
The application is responsible for providing a real-time clock with correct time-zone configuration to implement the Internet Timestamp, if possible. In order to implement this feature, the target hardware must usually include a real-time clock with the correct time zone configuration. However, NetUtil_TS_Get()
is not absolutely required and may return NET_TS_NONE
if real-time clock hardware is not available.