Why do Windows timing functions have poor resolution and accuracy?

In summary, The accuracy and resolution of Windows time functions are subpar and can be affected by non-monotonicly increasing jitters. The question remains if there are any simple ways to improve the high-resolution accuracy of Windows XP timers.
  • #1
Dissident Dan
238
2
One would think that counting time would be one of the simplest functions that a computer could do, given that computers generally operate based on fixed frequencies, which I believe are generated by crystals.

However, the windows time functions that I know are horrible. Firstly, they have horrible resolution, being able to get them down to about 5-8ms at best. Also, there are sometimes non-monotonicly increasing jitters.

Does anyone know of any simple ways to have high-resolution, accurate timers in Windows XP?
 
Computer science news on Phys.org
  • #2
http://www.cl.cam.ac.uk/users/kw217/useful/win32time.html
 
Last edited by a moderator:
  • #3
Dissident Dan said:
One would think that counting time would be one of the simplest functions that a computer could do, given that computers generally operate based on fixed frequencies, which I believe are generated by crystals.

The clock crystals in a computer aren't actually that good for producing accurate times. A $5 department store watch will keep better time than your computer will.
 

What are Windows timing functions?

Windows timing functions are a set of functions provided by the operating system that allow developers to measure and manipulate time within their programs. These functions are useful for tasks such as animations, scheduling events, and tracking performance.

How accurate are Windows timing functions?

The accuracy of Windows timing functions depends on the hardware and operating system. On modern computers, the functions can provide sub-millisecond accuracy. However, factors such as system load and system clock resolution can affect the accuracy of the functions.

What is the difference between high-resolution and low-resolution timing functions?

High-resolution timing functions provide greater accuracy and precision, while low-resolution timing functions have a lower accuracy and may be affected by system load. High-resolution functions are typically used for performance-critical tasks, while low-resolution functions are suitable for general timing purposes.

Can Windows timing functions be used for real-time applications?

Yes, Windows timing functions can be used for real-time applications, but it is important to note that they are not real-time operating system functions. The accuracy and precision of the functions may be affected by factors such as system load and clock resolution, so it is important to consider these factors when using the functions for real-time tasks.

Are there any limitations to using Windows timing functions?

One limitation of using Windows timing functions is that they may not be consistent across different hardware and operating systems. Additionally, the accuracy and precision of the functions can be affected by various factors, so it is important to carefully consider the use case and potential limitations when using these functions.

Similar threads

  • Computing and Technology
Replies
12
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
1K
  • Computing and Technology
Replies
23
Views
2K
  • Electrical Engineering
Replies
8
Views
725
  • Computing and Technology
Replies
14
Views
2K
  • Electrical Engineering
Replies
26
Views
3K
  • Biology and Medical
Replies
15
Views
2K
  • Computing and Technology
Replies
8
Views
3K
  • Advanced Physics Homework Help
Replies
7
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
Back
Top