Types

NTP data types. More...

Data Structures

struct  ntp_packet_t
 NTP packet data. More...
 

Typedefs

typedef void(* ntp_update_event_t) (ntp_packet_t *packet)
 Event handler for NTP update. More...
 

Detailed Description

NTP data types.

Typedef Documentation

typedef void(* ntp_update_event_t) (ntp_packet_t *packet)

Event handler for NTP update.

This event handler is called after an NTP update success or failure.

On success the packet parameter contains the returned NTP packet data. The 'packet' parameter is the same as the one passed in the 'packet_buffer' argument of zn_ntp_update().

Note
If a NULL 'packet_buffer' is passed to zn_ntp_update(), on success the 'packet' parameter will be ZOS_TRUE.

On failure the 'packet' parameter is NULL.

To get the updated NTP time in milliseconds issue zn_time_get_rtc_time() or zn_time_get_rtc_time_raw().

Note
Event handler executes in Network thread context.
Parameters
[out]packetntp_packet_t contained data returned by NTP server