]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
m_t0 can be recovered from underlying alarm and m_dt
authoridgay <idgay>
Fri, 11 Aug 2006 21:02:29 +0000 (21:02 +0000)
committeridgay <idgay>
Fri, 11 Aug 2006 21:02:29 +0000 (21:02 +0000)
tos/lib/timer/AlarmToTimerC.nc

index a4b6fe33582b683b71ca21be7cf61290137b7d74..64b9ea1cebbe65a9d4c4ab863c42725b47fde6f5 100644 (file)
@@ -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; }