Function anj_ntp_terminate

Function Documentation

void anj_ntp_terminate(anj_ntp_t *ntp)

Terminates the current NTP time synchronization operation and cleans up the NTP module.

This function should be called when the synchronization is no longer needed or when an error condition requires aborting the process. It has effect only when the NTP module is in the ANJ_NTP_STATUS_IN_PROGRESS. If called in any other state, the function has no effect.

After calling this function, the module’s status will transition to ANJ_NTP_STATUS_FINISHED_WITH_ERROR.

Subsequent calls to anj_ntp_step will complete the termination sequence by closing the UDP exchange and terminating the connection.

Parameters:

ntp – NTP module state.