Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » running program at different speeds
Re: running program at different speeds [message #37016 is a reply to message #37015] Thu, 09 August 2012 07:13 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

There are two factors in this: One is that when you call sleep function, the kernel switches context and lets another process to run. That might make the sleep longer, as mentioned in my previous post. The second factor you have to take in account is the precision of the mechanism you use to measure the time elapsed. If you search the forum, you will find couple threads about precise time measurements and what to be aware of.

Is there any particular reason why you need every interval to be *exactly* the same?

Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Add layout
Next Topic: Trouble with Socket
Goto Forum:
  


Current Time: Sat Jun 07 22:52:19 CEST 2025

Total time taken to generate the page: 0.04037 seconds