Merge pull request #438 from JiriBilek/master

Fixing now() function in RTClock.h
This commit is contained in:
Roger Clark 2018-03-28 13:37:01 +11:00 committed by GitHub
commit 2578bf00cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 3 deletions

View File

@ -52,7 +52,9 @@ class RTClock {
time_t getTime();
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 month(void) { getTime(tmm); return tmm.month; }
@ -100,4 +102,4 @@ class RTClock {
#endif // _RTCLOCK_H_

View File

@ -184,7 +184,9 @@ class RTClock {
time_t getTime();
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 month(void) { getTime(tm); return tm.month; }