Fixing now() function
The now() function was defined using the #define directive. That is wrong as it prevents using the keyword "now" in other situations.
This commit is contained in:
parent
42a5e9f907
commit
35e0a6453a
|
@ -52,7 +52,9 @@ class RTClock {
|
||||||
|
|
||||||
time_t getTime();
|
time_t getTime();
|
||||||
void getTime(tm_t & tmm );
|
void getTime(tm_t & tmm );
|
||||||
#define now getTime
|
|
||||||
|
time_t now() { return getTime(); }
|
||||||
|
void now(tm_t & tmm ) { getTime(tmm); } // non-standard use of now() function, added for compatibility with previous versions of the library
|
||||||
|
|
||||||
uint8_t year(void) { getTime(tmm); return tmm.year; }
|
uint8_t year(void) { getTime(tmm); return tmm.year; }
|
||||||
uint8_t month(void) { getTime(tmm); return tmm.month; }
|
uint8_t month(void) { getTime(tmm); return tmm.month; }
|
||||||
|
|
Loading…
Reference in New Issue