Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 6083e59

Browse files
committed
Removal of hidden dependency to RTCZero which is used to retrieve a epoch type timestamp
In #55 the possibility for retrieving a epoch type timestamp via a registered callback function has been introduced, the changes in arduino-libraries/ArduinoIoTCloud#93 register such a function which allows us to to remove the hidden dependency to RTCZero altogether
1 parent 9c8aa23 commit 6083e59

File tree

1 file changed

+2
-14
lines changed

1 file changed

+2
-14
lines changed

src/ArduinoCloudProperty.cpp

+2-14
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,9 @@
1717

1818
#include "ArduinoCloudProperty.h"
1919

20-
#ifdef ARDUINO_ARCH_SAMD
21-
#include <RTCZero.h>
22-
extern RTCZero rtc;
23-
#endif
24-
25-
static unsigned long getTimestamp() {
26-
#ifdef ARDUINO_ARCH_SAMD
27-
return rtc.getEpoch();
28-
#else
20+
#ifndef ARDUINO_ARCH_SAMD
2921
#pragma message "No RTC available on this architecture - ArduinoIoTCloud will not keep track of local change timestamps ."
30-
return 0;
31-
#endif
32-
}
22+
#endif
3323

3424
/******************************************************************************
3525
CTOR/DTOR
@@ -263,8 +253,6 @@ void ArduinoCloudProperty::updateLocalTimestamp() {
263253
if (isReadableByCloud()) {
264254
if (_get_time_func) {
265255
_last_local_change_timestamp = _get_time_func();
266-
} else {
267-
_last_local_change_timestamp = getTimestamp();
268256
}
269257
}
270258
}

0 commit comments

Comments
 (0)