]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
Backport change from CVS for getTime32() in CC2420TransmitP.
authorR. Steve McKown <rsmckown@gmail.com>
Tue, 25 Aug 2009 03:13:21 +0000 (21:13 -0600)
committerR. Steve McKown <rsmckown@gmail.com>
Mon, 9 Jul 2012 16:34:43 +0000 (10:34 -0600)
tos/chips/cc2420/transmit/CC2420TransmitP.nc

index 87898e2c5d759adf32ad320a21f17b3b93db7571..7e12cec89ae136f5c2b5496975083e72528f2cb7 100644 (file)
@@ -258,8 +258,9 @@ implementation {
   
   inline uint32_t getTime32(uint16_t time)
   {
-    uint32_t recent_time=call BackoffTimer.getNow();
-    return recent_time + (int16_t)(time - recent_time);
+    uint32_t recent_time = call BackoffTimer.getNow();
+
+    return recent_time - (uint16_t)(recent_time - time);
   }
 
   /**