> Hi
>
> I want to know how many seconds last a process :
>
> var dnow = $loader.loadprim("std date_now",0 <mailto:std date_now",0>);
> var timenow;
>
> timenow = dnow();
>
> // Process........
>
> $print( "Seconds : " , dnow() - timenow ,
"n" )
>
> But when I try to subtract, it gives me a Uncaught
exception - -
> In the documentation date_now returns an integer.
>
> Any idea?
date_now returns an int32, that's not an integer so you
can't use "-" on
these. Also, dates have 1-second precision so they might not
be the best
to measure the elapsed time. Try using sys_time or
sys_cpu_time instead.
Nicolas
--
Neko : One VM to run them all
(http://nekovm.org)
|