]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc2420/transmit/CC2420TransmitP.nc
added more documentation to the getTime32 function
[tinyos-2.x.git] / tos / chips / cc2420 / transmit / CC2420TransmitP.nc
index 79250cf34817aef8b151c56561c9cda38289f3e6..f1f47d0ae0e76474617aaf04e439b91752dac278 100644 (file)
@@ -255,13 +255,13 @@ implementation {
   async command void RadioBackoff.setCca(bool useCca) {
   }
   
-  
-  inline uint32_t getTime32(uint16_t time)
+  // this method converts a 16-bit timestamp into a 32-bit one
+  inline uint32_t getTime32(uint16_t captured_time)
   {
-    uint32_t recent_time = call BackoffTimer.getNow();
+    uint32_t now = call BackoffTimer.getNow();
 
-    // time is always in the past
-    return recent_time - (uint16_t)(recent_time - time);
+    // the captured_time is always in the past
+    return now - (uint16_t)(now - captured_time);
   }
 
   /**