From: R. Steve McKown Date: Sat, 13 Feb 2010 01:19:10 +0000 (-0700) Subject: Substitue for newest getTime32() by Miklos. X-Git-Tag: debian/2.1.0-4-1tmi~1^2 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=60dea0b445a208dee67b866d7fd6858092453d6f Substitue for newest getTime32() by Miklos. --- diff --git a/tos/chips/cc2420/transmit/CC2420TransmitP.nc b/tos/chips/cc2420/transmit/CC2420TransmitP.nc index a8367e54..cd640b1e 100644 --- a/tos/chips/cc2420/transmit/CC2420TransmitP.nc +++ b/tos/chips/cc2420/transmit/CC2420TransmitP.nc @@ -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); } /**