We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b5ee0c0 + 814940c commit ac6ca73Copy full SHA for ac6ca73
platform/mbed_rtc_time.cpp
@@ -33,6 +33,8 @@ static void (*_rtc_write)(time_t t) = rtc_write;
33
34
#include "drivers/LowPowerTimer.h"
35
36
+#define US_PER_SEC 1000000
37
+
38
static SingletonPtr<mbed::LowPowerTimer> _rtc_lp_timer;
39
static uint64_t _rtc_lp_base;
40
static bool _rtc_enabled;
@@ -50,7 +52,7 @@ static int _rtc_lpticker_isenabled(void)
50
52
51
53
static time_t _rtc_lpticker_read(void)
54
{
- return (uint64_t)_rtc_lp_timer->read() + _rtc_lp_base;
55
+ return _rtc_lp_timer->read_high_resolution_us() / US_PER_SEC + _rtc_lp_base;
56
}
57
58
static void _rtc_lpticker_write(time_t t)
0 commit comments