From d04aacb17477664b6c742a36b964f745d15533da Mon Sep 17 00:00:00 2001 From: mmaroti Date: Tue, 13 Apr 2010 20:27:05 +0000 Subject: [PATCH] added more documentation to the getTime32 function --- tos/chips/cc2420/transmit/CC2420TransmitP.nc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tos/chips/cc2420/transmit/CC2420TransmitP.nc b/tos/chips/cc2420/transmit/CC2420TransmitP.nc index 79250cf3..f1f47d0a 100644 --- a/tos/chips/cc2420/transmit/CC2420TransmitP.nc +++ b/tos/chips/cc2420/transmit/CC2420TransmitP.nc @@ -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); } /** -- 2.39.2