From 9664c394a63b2c1351957582465831d6c3b484d4 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Sat, 7 Mar 2020 11:49:35 +0000 Subject: [PATCH] drivers: nrf_rtc: Add a higher res monotonic timer --- wasp/drivers/nrf_rtc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wasp/drivers/nrf_rtc.py b/wasp/drivers/nrf_rtc.py index 54c58f1..d907461 100644 --- a/wasp/drivers/nrf_rtc.py +++ b/wasp/drivers/nrf_rtc.py @@ -57,3 +57,7 @@ class RTC(object): def get_time(self): localtime = self.get_localtime() return localtime[3:6] + + def get_uptime_ms(self): + """Return the current uptime in milliseconds.""" + return self.uptime * 1000