Typedef anj_ntp_event_callback_t

Typedef Documentation

typedef void anj_ntp_event_callback_t(void *arg, anj_ntp_t *ntp, anj_ntp_status_t status, anj_time_real_t synchronized_time)

Callback type for NTP events.

This callback is invoked whenever the NTP module reports a new event, such as a status change or the completion of a time synchronization operation.

When the status is ANJ_NTP_STATUS_FINISHED_SUCCESSFULLY, the callback will also provide the synchronized time via the synchronized_time parameter.

Param arg:

Opaque user argument passed to the callback.

Param ntp:

NTP object reporting the status change.

Param status:

Current NTP status value; see anj_ntp_status_t.

Param synchronized_time:

The synchronized time provided by the NTP module. Valid only when status is ANJ_NTP_STATUS_FINISHED_SUCCESSFULLY.