[ns] can't access $now

Haobo Yu haoboy@isi.edu
Mon, 10 Apr 2000 11:01:15 -0700 (PDT)


you should use [$ns now]. Others used it because they perhaps have set the
variable somewhere else. 

On Mon, 10 Apr 2000, Ishan Mandrekar wrote:

> ns-users:
> 
> I get a compile error when I try to execute this command:
> $ns at [expr $now+$interval] "check"
> 
> the error is:
> ns: check: can't read "now": no such variable
> 
> I've seen $now being used in other scripts to get the current simulation
> time. What could be the problem here?
> 
> The procedure definition of "check" goes as follows:
> proc check { } {
>  
>   global ns n3 n4 qlimit
> ....
> ...
> ..
> .
> $ns at [expr $now+$interval] "check"
> }
> 
> Thanks,
> Ishan. 
> 
>