|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
Simple Network Time Protocol Server API. More...
Functions | |
| void | sntp_server_clock_source (const uint8_t ref_id[4], uint8_t stratum, int8_t precision) |
| Set SNTP time source id, stratum and precision. | |
Simple Network Time Protocol Server API.
#include <sntp_server.h>
Set SNTP time source id, stratum and precision.
Until this function is called, the server answers queries with the leap indicator set to "clock not synchronized" and stratum 16, telling clients that its time must not be used. Call it after the system clock has been set to a trusted time.
| ref_id | the reference ID (RFC5905, Fig.12) |
| stratum | indicating the stratum of the clock source |
| precision | an exponent of two, where the resulting value is the precision of the system clock in seconds. |