Merge pull request #438 from JiriBilek/master
Fixing now() function in RTClock.h
This commit is contained in:
commit
2578bf00cb
|
@ -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; }
|
||||||
|
|
|
@ -184,7 +184,9 @@ class RTClock {
|
||||||
|
|
||||||
time_t getTime();
|
time_t getTime();
|
||||||
void getTime(tm_t & tm);
|
void getTime(tm_t & tm);
|
||||||
#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(tm); return tm.year; }
|
uint8_t year(void) { getTime(tm); return tm.year; }
|
||||||
uint8_t month(void) { getTime(tm); return tm.month; }
|
uint8_t month(void) { getTime(tm); return tm.month; }
|
||||||
|
|
Loading…
Reference in New Issue