Moved the TIMEOUT() definition until after the print_stats() definition so that the print_stats() function can be called when the TIMEOUT() is invoked

This commit is contained in:
adamdunkels 2010-01-31 19:18:26 +00:00
parent f63f6a7a88
commit fcd50868aa

View File

@ -350,8 +350,7 @@
<plugin> <plugin>
se.sics.cooja.plugins.ScriptRunner se.sics.cooja.plugins.ScriptRunner
<plugin_config> <plugin_config>
<script>TIMEOUT(500000, print_stats()); <script>
function function
print_stats() print_stats()
{ {
@ -394,9 +393,10 @@ print_stats()
"% tx " + 100 * total_transmit / (total_cpu + total_lpm) + "% tx " + 100 * total_transmit / (total_cpu + total_lpm) +
"% average latency " + total_latency / (4096 * total_received) + "% average latency " + total_latency / (4096 * total_received) +
" ms \n"); " ms \n");
} }
TIMEOUT(500000, print_stats());
/* Conf. */ /* Conf. */
booted = new Array(); booted = new Array();
count = new Array(); count = new Array();