[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Progress meter for ns
I find this useful for long running simulations...Prints a text line
indicating progress at whatever interval you specify:
# Simple progress monitor for ns
# George F. Riley, Georgia Tech, Spring 1999
Simulator instproc progress { } {
global progress_interval
puts [format "Progress to %6.1f seconds" [$self now]]
if { ![info exists progress_interval] } {
set progress_interval [$self now]
}
$self at [expr [$self now] + $progress_interval] "$self progress"
}
To use it, include the above proc definition, and then somewhere in your
script:
$ns at 10.0 "$ns progress"
(for example...) This one prints out at 10 second intervals, but specify
whatever value is useful for your script. The intervals are SIMULATED
time, not wall clock time...
George
-George F. Riley ([email protected])