]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420/transmit/CC2420TransmitP.nc
Substitue for newest getTime32() by Miklos.
[tinyos-2.x.git] / tos / chips / cc2420 / transmit / CC2420TransmitP.nc
index a8367e54c99f0342df952fd65fda1dc59baf2e5c..cd640b1e7f29336bdbcef0a65e8a46bf238496cd 100644 (file)
@@ -238,8 +238,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);
   }
 
   /**