List Info

Thread: Time Elapsed




Time Elapsed
country flaguser name
Peru
2007-03-28 05:35:08
Hi
 
I want to know how many seconds last a process :
 
var dnow = $loader.loadprim("stddate_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?
 
Greats
Transdiv
 
 
 
Re: Time Elapsed
country flaguser name
France
2007-03-28 07:06:59
> Hi
>  
> I want to know how many seconds last a process :
>  
> var dnow = $loader.loadprim("stddate_now",0 <mailto:stddate_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)

Re: Time Elapsed
user name
2007-03-28 10:30:20
Tks 

> 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)

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )