NTP data types. More...

Data Structures

struct ntp_packet_t
NTP packet data. More...


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

Detailed Description

NTP data types.

Typedef Documentation


typedef void(* gos_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 gos_ntp_update() .

If a NULL 'packet_buffer' is passed to gos_ntp_update() , on success the 'packet' parameter will be true.

On failure the 'packet' parameter is NULL.

To get the updated NTP time in milliseconds see gos_time_get_current_utc_ms() .

Event handler executes in Network thread context.
[out] packet ntp_packet_t contained data returned by NTP server