From: Jason Sweat Date: 2005-11-11T22:28:00+09:00 Subject: Re: Accurate Timing in ruby On 11/11/05, Kero wrote: > > In my experience it does: > > > > irb(main):006:0> a=Time.now;while Time.now==a;end;Time.now-a > > => 0.01 > > > > ie. Time.now only gives you the time in centiseconds. > > That's bad. > > On linux (700 MHz Duron) I get: > > irb(main):036:0> a=Time.now;while Time.now==a;end;Time.now-a > => 2.0e-05 > > And on my iPAQ w/ linux (200 MHz strongarm) I get: > > irb(main):001:0> a=Time.now;while Time.now==a;end;Time.now-a > => 0.000271 > > (still with usec accuracy) > > So my PDA is more accurate than your machine (what OS is that?) Linux on a pathetic old box: $ irb irb(main):001:0> a=Time.now;while Time.now==a;end;Time.now-a => 4.4e-05 irb(main):002:0> $ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 5 model name : Pentium II (Deschutes) stepping : 1 cpu MHz : 350.802 cache size : 512 KB Regards, Jason http://blog.casey-sweat.us/