From 5d774627c6a5f959045751f9d354257b8928313d Mon Sep 17 00:00:00 2001 From: "R. Steve McKown" Date: Mon, 24 Aug 2009 21:13:21 -0600 Subject: [PATCH] Backport change from CVS for getTime32() in CC2420TransmitP. --- 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 87898e2c..7e12cec8 100644 --- a/tos/chips/cc2420/transmit/CC2420TransmitP.nc +++ b/tos/chips/cc2420/transmit/CC2420TransmitP.nc @@ -258,8 +258,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