|
|
@@ -38,7 +38,7 @@ |
|
|
|
static const uint8_t monthDays[] = { 31,28,31,30,31,30,31,31,30,31,30,31 }; // API starts months from 1, this array starts from 0 |
|
|
|
|
|
|
|
__attribute__((__optimize__("O2"))) |
|
|
|
void breakTime(timestamp_t timeInput, tmElements_t &tm) { |
|
|
|
void breakTime(const timestamp_t timeInput, tmElements_t &tm) { |
|
|
|
// break the given timestamp_t into time components |
|
|
|
// this is a more compact version of the C library localtime function |
|
|
|
// note that year is offset from 1970 !!! |
|
|
@@ -95,7 +95,7 @@ void breakTime(timestamp_t timeInput, tmElements_t &tm) { |
|
|
|
} |
|
|
|
|
|
|
|
__attribute__((__optimize__("O2"))) |
|
|
|
timestamp_t makeTime(tmElements_t &tm) { |
|
|
|
timestamp_t makeTime(const tmElements_t &tm) { |
|
|
|
// assemble time elements into timestamp_t |
|
|
|
// note year argument is offset from 1970 (see macros in time.h to convert to other formats) |
|
|
|
// previous version used full four digit year (or digits since 2000),i.e. 2009 was 2009 or 9 |
|
|
|