Re: Strange time() behaviour

new topic     » goto parent     » topic index » view thread      » older message » newer message

Leonardo Cecchi wrote:

> 
> In the euphoria reference library I read that time() 
> "Return the number of seconds since some fixed point in the past.".
> 
> But, if I execute the following code:
> 
> }}}
<eucode>
> procedure test_time()
>   atom timer, exit_code
> 
>   timer=time()
>   exit_code=system_exec("sleep 2s", 2)
>   ? time()-timer
> end procedure
> 
> test_time()
> </eucode>
{{{

> 
> I obtain:
> 
> $ exu testtime.e 
> 0.0002019999999
> 
> I think the right result should be a number bigger than 2.
> Where I'm wrong?
> I'm working with Euphoria 3.0.2/Linux and the result 
> is the same with Euphoria SVN.
> Thanks,
> 
> Leonardo

Works OK here, I've got 2.02.

EU 3.0.2 and EU 2.5 on Linux Mandrake 10.0.

 From procedure or from top level,
from ed.ex or from command line - same results,
I could not reproduce that strange your result.

Regards,
Igor Kachan
kinz at peterlink.ru

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu