From 60dea0b445a208dee67b866d7fd6858092453d6f Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Fri, 12 Feb 2010 18:19:10 -0700 Subject: [PATCH] Substitue for newest getTime32() by Miklos. --- tos/chips/cc2420/transmit/CC2420TransmitP.nc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); } /** -- 2.39.2