]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420/transmit/CC2420TransmitP.nc
Backport change from CVS for getTime32() in CC2420TransmitP.
[tinyos-2.x.git] / 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);
   }
 
   /**