[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Elapsed time -- tiny code snippet

Trans

4/13/2005 12:50:00 AM

Tried it with and without floats, and yes float give more precision.
But strangely this happens either way:

Time.elapse { sleep 1 } #=> 0.999188899993896

Not 1 or more? Odd.

T.

1 Answer

Lyndon Samson

4/13/2005 7:33:00 AM

0

On 4/13/05, Trans <transfire@gmail.com> wrote:
> Tried it with and without floats, and yes float give more precision.
> But strangely this happens either way:
>
> Time.elapse { sleep 1 } #=> 0.999188899993896
>
> Not 1 or more? Odd.
>

You may find this
http://docs.sun.com/source/806-3568/ncg_gol... interesting
reading.

> T.
>
>


--
Into RFID? www.rfidnewsupdate.com Simple, fast, news.