Types

NTP data types. More...

Data Structures

struct  ntp_packet_t
 NTP packet data. More...
 

Typedefs

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

Detailed Description

NTP data types.

Typedef Documentation

◆ gos_ntp_update_event_t

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().

Note
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().

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