Hi!
The timer method is probably not executed because the finish-method gets
scheduled first. Both methods should execute at 50s, but for some reason
"finish" ends up ahead in the scheduler. My suggestion is to set the
finish-time at 50.1s.
Good luck!
Mats Folke
El hadi Cherkaoui wrote:
>
Hi
how do you mean that the simulation doesn't take 50s? Bear in mind that
simulation time ist not equal to clock time!! So you don't expect your
simulation to last exactly 50s clock time. This is actually the essence
of simulation.
greetings
Vincent.
El hadi Cherkaoui wrote:
> hi all,
>
> i w
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"