From: Tomas Pospisek's Mailing Lists Date: 2007-03-02T08:08:31+09:00 Subject: Re: replacing the use of gettimeofday in the scheduler On Fri, 2 Mar 2007, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: replacing the use of gettimeofday in the scheduler" > on Fri, 2 Mar 2007 07:31:16 +0900, "Avdi Grimm" writes: > > |Sounds like a bug to me. Time updates happen, sometimes without user > |intervention or knowledge. Software which can glitch or hang up as a > |result of this fact isn't robust. > > If it is a bug, I suspect it's a bug in POSIX that doesn't provide any > API for proper "clock" for the purpose. Correct me if I'm wrong. I'd say it's a feature that's missing in POSIX. However you can hack around the fact by using system specific calls (on Linux f.ex. /proc/uptime). What about using Ruby's own "thread_timer" as a more or less accurate time source? *t -- ----------------------------------------------------------- Tomas Pospisek http://sourcepole.com - Linux & Open Source Solutions -----------------------------------------------------------