From: Ganesh Gunasegaran Date: 2007-04-27T06:19:11+09:00 Subject: Re: 10 millisecond delay/callback Are you running Fedora inside a virtual machine? Virtual machines like VMware, qemu are known to cause clock skews! Cheers, Ganesh Gunasegaran. On 27-Apr-07, at 2:32 AM, Earle Clubb wrote: > unknown wrote: >> On Fri, 27 Apr 2007, Earle Clubb wrote: >> >>> 132 >>> 143 >>> 162 >>> 191 >> >> Try select() >> ---- >> irb(main):005:0> 0.upto(25) do >> irb(main):006:1* select(nil,nil,nil,0.01) >> irb(main):007:1> puts Time.now.usec/1000 >> irb(main):008:1> end >> 138 >> 148 >> 158 >> 168 > > I just tried select and had the same results as sleep: > > irb(main):001:0> 25.times do > irb(main):002:1* select(nil,nil,nil,0.01) > irb(main):003:1> puts Time.now.usec/1000 > irb(main):004:1> end > 787 > 797 > 814 > 839 > 858 > 877 > 894 > 912 > 932 > 951 > 965 > 985 > 1 > 21 > 39 > 62 > 81 > 100 > 117 > 134 > 154 > 174 > 193 > 212 > 228 > > > FWIW, I'm using ruby 1.8.5 on Fedora Core 6 with kernel > 2.6.20-1.2944.fc6. > > Earle > > > -- > Posted via http://www.ruby-forum.com/. >