A time interface class. This class replicates the normal time functions, but goes a couple of steps further. mbed library 82 and prior has a defective gmtime function. Also, this class enables access to setting the time, and adjusting the accuracy of the RTC.
Dependents: CI-data-logger-server WattEye X10Svr SSDP_Server
Diff: TimeInterface.h
- Revision:
- 17:45dae5a72679
- Parent:
- 16:6280e99501f8
- Child:
- 20:5ca2c94d46b8
--- a/TimeInterface.h Sat Mar 04 16:57:43 2017 +0000 +++ b/TimeInterface.h Wed Apr 12 02:25:22 2017 +0000 @@ -63,14 +63,19 @@ /// // | |<---- set_cal(int32_t) /// // | |----> int32_t get_cal() /// // | |----> bool get_dst() -/// // | |<---- set_dst(char *, char *) +/// // | | /// // | |<---- set_time(time_t t, int16_t) /// // | |----> time_t time(time_t *) -/// // | |--+-> time_t timelocal(time_t *) -/// // +--------+ | -/// // | -/// // +--------+ | -/// // | tzo |--+ +/// // | |------+ +/// // +--------+ | +/// // +- | <---- set_dst(char *, char *) +/// // +--------+ | | +----------+ +/// // | |<--+ +--|time_local| +/// // |dst_pair|---------| |--------> time_t timelocal(time_t *) +/// // +--------+ +--| | +/// // | +----------+ +/// // +--------+ | +/// // | tzo |------+ /// // | |<---- set_tzo_min(int16_t) /// // | |----> int16_t get_tzo_min() /// // +--------+ @@ -97,7 +102,6 @@ /// // +- strftime(char * ptr, ..., tm_ex *) --> | buffer | /// // +--------------------------+ /// // double difftime(time_t end, time_t) -/// /// @endcode /// class TimeInterface @@ -358,7 +362,6 @@ const char * strptime(const char *buf, char *fmt, struct tm_ex *tm); - // time zone functions /// Set the internal RTC (clock) to the time value.