[Tinyos-2-commits] [tinyos-main] r5733 committed - rfxlink: fix issue 62 (thanks Morten)

tinyos-main at googlecode.com tinyos-main at googlecode.com
Sun Sep 11 17:50:09 PDT 2011


Revision: 5733
Author:   mmaroti
Date:     Sun Sep 11 17:49:03 2011
Log:      rfxlink: fix issue 62 (thanks Morten)
http://code.google.com/p/tinyos-main/source/detail?r=5733

Modified:
  /trunk/tos/lib/rfxlink/layers/TrafficMonitorLayerP.nc

=======================================
--- /trunk/tos/lib/rfxlink/layers/TrafficMonitorLayerP.nc	Mon Jul 25  
20:07:24 2011
+++ /trunk/tos/lib/rfxlink/layers/TrafficMonitorLayerP.nc	Sun Sep 11  
17:49:03 2011
@@ -244,18 +244,18 @@

  	async command uint32_t TrafficMonitor.getActiveTime()
  	{
-		uint32_t time, localTime;
+		uint32_t atime, localTime;

  		localTime = call LocalTime.get();

  		atomic
  		{
-			time = activeTime;
+			atime = activeTime;
  			if( radioState != RADIO_OFF )
-				time += localTime - radioStart;
+				atime += localTime - radioStart;
  		}

-		return time;
+		return atime;
  	}

  	async command uint32_t TrafficMonitor.getCurrentTime()


More information about the Tinyos-2-commits mailing list