forked from PaulStoffregen/Time
use const for mkTime input (fixes #85)
This commit is contained in:
2
Time.cpp
2
Time.cpp
@ -201,7 +201,7 @@ void breakTime(time_t timeInput, tmElements_t &tm){
|
|||||||
tm.Day = time + 1; // day of month
|
tm.Day = time + 1; // day of month
|
||||||
}
|
}
|
||||||
|
|
||||||
time_t makeTime(tmElements_t &tm){
|
time_t makeTime(const tmElements_t &tm){
|
||||||
// assemble time elements into time_t
|
// assemble time elements into time_t
|
||||||
// note year argument is offset from 1970 (see macros in time.h to convert to other formats)
|
// 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
|
// previous version used full four digit year (or digits since 2000),i.e. 2009 was 2009 or 9
|
||||||
|
@ -136,7 +136,7 @@ void setSyncInterval(time_t interval); // set the number of seconds between r
|
|||||||
|
|
||||||
/* low level functions to convert to and from system time */
|
/* low level functions to convert to and from system time */
|
||||||
void breakTime(time_t time, tmElements_t &tm); // break time_t into elements
|
void breakTime(time_t time, tmElements_t &tm); // break time_t into elements
|
||||||
time_t makeTime(tmElements_t &tm); // convert time elements into time_t
|
time_t makeTime(const tmElements_t &tm); // convert time elements into time_t
|
||||||
|
|
||||||
} // extern "C++"
|
} // extern "C++"
|
||||||
#endif // __cplusplus
|
#endif // __cplusplus
|
||||||
|
Reference in New Issue
Block a user