Timer that syncs with NTP server.
More...
#include <timer.h>
Timer that syncs with NTP server.
Definition at line 26 of file timer.h.
◆ Timer()
◆ begin()
void Timer::begin |
( |
long int |
sync_interval_ms = 600000 | ) |
|
initialise the timer, set a sync interval to sync with NTP server
- Parameters
-
sync_interval_ms | sync interval in milliseconds |
Definition at line 52 of file timer.cpp.
◆ get_epoch_time()
time_t Timer::get_epoch_time |
( |
| ) |
|
Get the seconds since epoch now.
- Returns
- time_t
Definition at line 38 of file timer.cpp.
◆ get_utc_time()
tm Timer::get_utc_time |
( |
| ) |
|
Get the utc time now.
- Returns
- tm
Definition at line 28 of file timer.cpp.
◆ print_utc_time()
void Timer::print_utc_time |
( |
| ) |
|
Print the seconds since epoch.
Definition at line 44 of file timer.cpp.
The documentation for this class was generated from the following files: