]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/tests/TestSimTimers/script.py
Fixed simulated timers to follow new atm128 timer stack.
[tinyos-2.x.git] / apps / tests / TestSimTimers / script.py
diff --git a/apps/tests/TestSimTimers/script.py b/apps/tests/TestSimTimers/script.py
new file mode 100644 (file)
index 0000000..6feb89e
--- /dev/null
@@ -0,0 +1,20 @@
+from TOSSIM import *
+import sys
+import time
+
+t = Tossim([])
+
+t.addChannel("TestTimer", sys.stdout)
+#t.addChannel("Timer", sys.stdout)
+#t.addChannel("HplAtm128Timer0AsyncP", sys.stdout)
+#t.addChannel("Atm128AlarmAsyncP", sys.stdout)
+
+start = time.time();
+m1 = t.getNode(0)
+
+m1.bootAtTime(345321);
+
+for i in range(0, 1000000):
+    t.runNextEvent();
+
+