mirror of
https://github.com/PaulStoffregen/Time.git
synced 2025-08-01 07:04:26 +02:00
Use TimeLib.h header internally too
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
*
|
*
|
||||||
* No memory is consumed in the sketch if your code does not call any of the string methods
|
* No memory is consumed in the sketch if your code does not call any of the string methods
|
||||||
* You can change the text of the strings, make sure the short strings are each exactly 3 characters
|
* You can change the text of the strings, make sure the short strings are each exactly 3 characters
|
||||||
* the long strings can be any length up to the constant dt_MAX_STRING_LEN defined in Time.h
|
* the long strings can be any length up to the constant dt_MAX_STRING_LEN defined in TimeLib.h
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
#define strcpy_P(dest, src) strcpy((dest), (src))
|
#define strcpy_P(dest, src) strcpy((dest), (src))
|
||||||
#endif
|
#endif
|
||||||
#include <string.h> // for strcpy_P or strcpy
|
#include <string.h> // for strcpy_P or strcpy
|
||||||
#include "Time.h"
|
#include "TimeLib.h"
|
||||||
|
|
||||||
// the short strings for each day or month must be exactly dt_SHORT_STR_LEN
|
// the short strings for each day or month must be exactly dt_SHORT_STR_LEN
|
||||||
#define dt_SHORT_STR_LEN 3 // the length of short strings
|
#define dt_SHORT_STR_LEN 3 // the length of short strings
|
||||||
|
2
Time.cpp
2
Time.cpp
@@ -33,7 +33,7 @@
|
|||||||
#include <WProgram.h>
|
#include <WProgram.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Time.h"
|
#include "TimeLib.h"
|
||||||
|
|
||||||
static tmElements_t tm; // a cache of time elements
|
static tmElements_t tm; // a cache of time elements
|
||||||
static time_t cacheTime; // the time the cache was updated
|
static time_t cacheTime; // the time the cache was updated
|
||||||
|
Reference in New Issue
Block a user