![]() |
Mbed OS Reference
|
Implementation of the C time.h functions. More...
#include <time.h>Go to the source code of this file.
Data Structures | |
| struct | timeval |
Functions | |
| void | set_time (time_t t) |
| Set the current time. | |
| void | attach_rtc (time_t(*read_rtc)(void), void(*write_rtc)(time_t), void(*init_rtc)(void), int(*isenabled_rtc)(void)) |
| Attach an external RTC to be used for the C time functions. | |
| int | gettimeofday (struct timeval *tv, void *tz) |
| Standard lib retarget, get time since Epoch. | |
| int | settimeofday (const struct timeval *tv, const struct timezone *tz) |
| Standard lib retarget, set time since Epoch. | |
Implementation of the C time.h functions.
Provides mechanisms to set and read the current time, based on the microcontroller Real-Time Clock (RTC), plus some standard C manipulation and formatting functions.
Example:
Definition in file mbed_rtc_time.h.