From: Dossy Date: 2002-06-07T22:57:14+09:00 Subject: Re: 1-second events On 2002.06.07, Paul Brannan wrote: > I like the simplicity of this solution. But if I change: > p Time.now > to > puts "#{Time.now.tv_sec}.#{Time.now.tv_usec}" > then I see quite a lot of drift: [...] > > Over the course of a day I would expect to eventually lose a second. Welcome to the world of soft real-time systems. You're battling computational overhead (thread, code execution, load on your system) as well as things like RTC jitter and not having real high-resolution time ... Out of curiousity: what are you doing that requires such precise periodic execution? Embedded software for a pacemaker? :-) -- Dossy -- Dossy Shiobara mail: dossy@panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)