From 0305ef7b060a5eea5eecfd0bb951fad4040deff5 Mon Sep 17 00:00:00 2001 From: idgay Date: Fri, 11 Aug 2006 21:02:29 +0000 Subject: [PATCH] m_t0 can be recovered from underlying alarm and m_dt --- tos/lib/timer/AlarmToTimerC.nc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tos/lib/timer/AlarmToTimerC.nc b/tos/lib/timer/AlarmToTimerC.nc index a4b6fe33..64b9ea1c 100644 --- a/tos/lib/timer/AlarmToTimerC.nc +++ b/tos/lib/timer/AlarmToTimerC.nc @@ -41,13 +41,11 @@ implementation { // there might be ways to save bytes here, but I'll do it in the obviously // right way for now - uint32_t m_t0; uint32_t m_dt; bool m_oneshot; void start(uint32_t t0, uint32_t dt, bool oneshot) { - m_t0 = t0; m_dt = dt; m_oneshot = oneshot; call Alarm.startAt(t0, dt); @@ -88,7 +86,7 @@ implementation { return call Alarm.getNow(); } command uint32_t Timer.gett0() - { return m_t0; } + { return call Alarm.getAlarm() - m_dt; } command uint32_t Timer.getdt() { return m_dt; } -- 2.39.2