|
ENTS-tock
Environmental NeTworked Sensor firmware on Tock OS
|
Go to the source code of this file.
Functions | |
| uint32_t | epoch (void) |
| Gets the current unix epoch timestamp. | |
| void | set_epoch (uint32_t epoch) |
| Sets the current unix epoch timestamp. | |
| uint32_t | rtc_date_to_epoch (const libtock_rtc_date_t *date) |
| Converts tock time to unix epoch time. | |
| void | epoch_to_rtc_date (uint32_t epoch, libtock_rtc_date_t *date) |
| Convert unix epoch to tock time. | |
| void epoch_to_rtc_date | ( | uint32_t | epoch, |
| libtock_rtc_date_t * | date | ||
| ) |
Convert unix epoch to tock time.
| epoch | Input epoch. |
| date | Output date |
Definition at line 65 of file time.c.
References epoch().
Referenced by set_epoch(), and test_epoch_to_rtc_date().
| uint32_t rtc_date_to_epoch | ( | const libtock_rtc_date_t * | date | ) |
Converts tock time to unix epoch time.
| date | Pointer to date struct. |
Definition at line 31 of file time.c.
Referenced by epoch(), and test_rtc_date_to_epoch().
| void set_epoch | ( | uint32_t | epoch | ) |
Sets the current unix epoch timestamp.
| epoch | Unix epoch. |
Definition at line 25 of file time.c.
References epoch(), and epoch_to_rtc_date().
Referenced by lorawan_timesync(), and test_time_epoch().