all,
i want ot creat a timer on tcl
set ns [new Simulator]
set bw bw2.dat
set f [open $bw w]
proc timer {} {
global ns f
set time 10
set now [$ns now]
set cost [expr floor( rand() * 40) + 20] ;# exemple
puts $f $now : $cost
$ns at [expr $now+$time] timer
hi all,
i want ot creat a timer on tcl
set ns [new Simulator]
set bw bw2.dat
set f [open $bw w]
proc timer {} {
global ns f
set time 10
set now [$ns now]
set cost [expr floor( rand() * 40) + 20] ;# exemple
puts $f $now : $cost
$ns at [expr $now+$time] timer
want ot creat a timer on tcl
set ns [new Simulator]
set bw bw2.dat
set f [open $bw w]
proc timer {} {
global ns f
set time 10
set now [$ns now]
set cost [expr floor( rand() * 40) + 20] ;# exemple
puts $f $now : $cost
$ns at [expr $now+$time] timer