From: idgay Date: Fri, 11 Aug 2006 21:02:29 +0000 (+0000) Subject: m_t0 can be recovered from underlying alarm and m_dt X-Git-Tag: tinyos/2.0.1~287 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=0305ef7b060a5eea5eecfd0bb951fad4040deff5;p=tinyos-2.x.git m_t0 can be recovered from underlying alarm and m_dt --- 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; }