Re: [ns] timer on tcl

2009-05-26 Thread Mats Folke
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

[ns] timer on tcl

2009-05-25 Thread El hadi Cherkaoui
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

Re: [ns] timer on tcl

2009-05-25 Thread Vincent Chimaobi Emeakaroha
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