summaryrefslogtreecommitdiff
path: root/wasp/boards/simulator
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-14 12:24:28 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-11-14 12:24:28 (GMT)
commitd0a99d5636e9e597a44d872b5350c3588b032439 (patch)
tree8b0c975c43ef421fd78efd3aae09d69219ba2802 /wasp/boards/simulator
parentd2357f232577d389a8b79afddd96cdf9f21695af (diff)
manager: Implement alarm callbacks for applications to use
Create a simple time queue where actions (functions or bound methods) can be queued against the real time clock. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/boards/simulator')
-rw-r--r--wasp/boards/simulator/watch.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/wasp/boards/simulator/watch.py b/wasp/boards/simulator/watch.py
index de1b584..e19e728 100644
--- a/wasp/boards/simulator/watch.py
+++ b/wasp/boards/simulator/watch.py
@@ -117,6 +117,9 @@ class RTC(object):
now = self.get_localtime()
return (now[3], now[4], now[5])
+ def time(self):
+ return time.time()
+
@property
def uptime(self):
return time.time() - self._epoch