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.cpp
- Revision:
- 3:49f36b489b64
- Parent:
- 2:65e0a25c7551
- Child:
- 5:a5f50b5fb856
--- a/TimeInterface.cpp Sun Jun 22 21:00:01 2014 +0000 +++ b/TimeInterface.cpp Sat Jun 28 19:49:26 2014 +0000 @@ -3,7 +3,7 @@ #include "rtc_api.h" -#define DEBUG "Time" +//#define DEBUG "Time" #include <cstdio> #if (defined(DEBUG) && !defined(TARGET_LPC11U24)) #define DBG(x, ...) std::printf("[DBG %s %3d] "x"\r\n", DEBUG, __LINE__, ##__VA_ARGS__); @@ -57,6 +57,16 @@ return res; } +void set_dst(bool dst) +{ + (void)dst; +} + +bool get_dst(void) +{ + return false; +} + clock_t TimeInterface::clock(void) { return std::clock();