|
Rockbox mail archiveSubject: Re: X11 simulator clock runs too fastRe: X11 simulator clock runs too fast
From: Jerry Van Baren <gerald.vanbaren_at_smiths-aerospace.com>
Date: Thu, 06 Mar 2003 07:53:40 -0500 There is a high resolution timer patch for linux: http://www.ittc.ku.edu/utime/ Also included in KURT: http://www.ittc.ku.edu/kurt/ It works very well. I don't know if it has been accepted into the mainstream kernel yet. gvb At 11:56 AM 3/6/2003 -0500, daniel_at_haxx.se wrote: >On Wed, 5 Mar 2003, c s wrote: > > > While developing a mod to the wps, I noticed that the X11 simulator clock > > was running much faster than the actual clock does on the Archos. > >It certainly does. And it runs differently on different computers as well. > >The reasoning behind this is that the simulator will never resemble the >target when it comes to time or speed. Thus, we've mainly focused in getting >the timer to run, not to be accurate. > > > I wrote a better fix that uses a separate thread that does nothing but > > increment current_tick every 10ms, however there is a problem with it > > because on many (most?) Linux systems the shortest wait you can do with a > > call to poll() (or usleep(), or nanosleep() ) is 20ms. This makes > > current_tick run at only 50Hz on systems that can't do a suspended wait of > > only 10ms. > >I think you're overdoing the accuracy of the tick slightly. > >I think you should do whatever sleep you can do, and then read out the actual >time it took and increase the tick counter accordingly. Then it doesn't >matter if your system supports 10, 20 or 200 ms sleep accuracy. > > > Also I believe that similar problems exist in the win32 specific simulator > > code, but I didn't look into details or fixes for the win32 code. > >I'm positive the problem is very similar there too, yes. > > > Is there any interest in using or improving the other fixes that I have > > discussed? I have included some of the code that I wrote below if anyonone > > is interested in the details of what I discussed above. > >I don't like the busy-sleep approach, but I'm certainly interested in >improving this situation. > >-- > Daniel Stenberg -- http://rockbox.haxx.se/ -- http://daniel.haxx.se/ ********************************************************************** This e-mail and any files transmitted with it are confidential and may be legally privileged or otherwise exempt from disclosure under applicable law. This e-mail and its files are intended solely for the individual or entity to whom they are addressed and their content is the property of Smiths Aerospace. If you are not the intended recipient, please do not read, copy, use or disclose this communication. If you have received this e-mail in error please notify the e-mail administrator at postmaster_at_si.com and then delete this e-mail, its files and any copies. This footnote also confirms that this e-mail message has been scanned for the presence of known computer viruses. *********************************************************************** Received on 2003-03-06 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |