Simple Network Time Protocol (SNTP) implementation.
More...
Simple Network Time Protocol (SNTP) implementation.
◆ sntp_get_offset()
int64_t sntp_get_offset |
( |
void |
| ) |
|
Get real time offset from system time as returned by xtimer_now64()
- Returns
- Real time offset in microseconds relative to 1900-01-01 00:00 UTC
◆ sntp_get_unix_usec()
static uint64_t sntp_get_unix_usec |
( |
void |
| ) |
|
|
inlinestatic |
Get time in microseconds from 1970-01-01 00:00:00 UTC.
- Returns
- Time in microseconds from 1970-01-01 00:00:00 UTC
Definition at line 60 of file sntp.h.
◆ sntp_sync()
Synchronize with time server.
- Parameters
-
[in] | server | The time server |
[in] | timeout | Timeout for the server response in microseconds |
- Returns
- 0 on success
-
Negative number on error