]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tests/TestSimTimers/TestTimerC.nc
Simulation test cases.
[tinyos-2.x.git] / apps / tests / TestSimTimers / TestTimerC.nc
index ee18f71a1254730f2dedc0457e9901292cbbbfce..944b6984ae4a5f576d96173921d50db3b194dc65 100644 (file)
@@ -64,10 +64,10 @@ implementation {
     sim_time_t elapsed = now - start;
     elapsed /= (sim_ticks_per_sec() / 1024);
     if (elapsed != interval) {
-      dbg("TestTimer", "Timer %c is off. Should have fired in %u, fired in %u.\n", name, interval, (uint32_t)elapsed);
+      dbg("TestTimer", "Timer %c is off. Should have fired in %u, fired in %u @ %s.\n", name, interval, (uint32_t)elapsed, sim_time_string());
     }
     else {
-      dbg("TestTimer", "Timer %c is good.\n", name);
+      dbg("TestTimer", "Timer %c is good @ %s.\n", name, sim_time_string());
     }
   }
   
@@ -81,8 +81,8 @@ implementation {
   void startTimers() {
     call A.startPeriodic(aTime);
     call B.startPeriodic(bTime);
-    call C.startOneShot(cTime);
-    call D.startOneShot(dTime);
+//    call C.startOneShot(cTime);
//   call D.startOneShot(dTime);
     aStart = bStart = cStart = dStart = sim_time();
   }
   
@@ -104,7 +104,7 @@ implementation {
   event void B.fired() {
     check('B', bStart, bTime);
     call B.stop();
-    bTime = 1 + (call Random.rand32() & 0x3ff);
+    bTime = 1 + (call Random.rand32() & 0x3fff);
     call B.startPeriodic(bTime);
     bStart = sim_time();
   }