Strange time() behaviour

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

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:

procedure test_time()
  atom timer, exit_code

  timer=time()
  exit_code=system_exec("sleep 2s", 2)
  ? time()-timer
end procedure

test_time()


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

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

Search



Quick Links

User menu

Not signed in.

Misc Menu