From 57ac01adc9744586eb1f7798459b227c8d86aaa1 Mon Sep 17 00:00:00 2001 From: tomer-w <57483589+tomer-w@users.noreply.github.com> Date: Sun, 1 Mar 2020 23:06:35 +0200 Subject: [PATCH] Fix *ToTime_t macros The daysToTime_t (and all other similar macros) does not compile correctly on recent Arduino SDK. Apparently the compiler require that there will be no space between the macro name and the (x) parameter definition. --- TimeLib.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TimeLib.h b/TimeLib.h index b587046..e2c5be4 100644 --- a/TimeLib.h +++ b/TimeLib.h @@ -89,10 +89,10 @@ typedef time_t(*getExternalTime)(); /* Useful Macros for converting elapsed time to a time_t */ -#define minutesToTime_t ((M)) ( (M) * SECS_PER_MIN) -#define hoursToTime_t ((H)) ( (H) * SECS_PER_HOUR) -#define daysToTime_t ((D)) ( (D) * SECS_PER_DAY) // fixed on Jul 22 2011 -#define weeksToTime_t ((W)) ( (W) * SECS_PER_WEEK) +#define minutesToTime_t(M) ( (M) * SECS_PER_MIN) +#define hoursToTime_t(H) ( (H) * SECS_PER_HOUR) +#define daysToTime_t(D) ( (D) * SECS_PER_DAY) // fixed on Jul 22 2011 +#define weeksToTime_t(W) ( (W) * SECS_PER_WEEK) /*============================================================================*/ /* time and date functions */