RE: C# Thread.Sleep malfunction

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jim Happ (JimHapp_at_discussions.microsoft.com)
Date: 10/22/04


Date: Fri, 22 Oct 2004 09:17:13 -0700

In XP Pro I have found Sleep() has a 15ms resolution as the default and
GetTickCount() has a 1ms resolution by default.

If you are running on a Dell with all the stupid multimedia software they
install for you, often some proccess is running which has called
timeBeginPeriod(1). This reverses the numbers just quoted. Listing to music
with Windows Media Player does this as well. But this is not the default
behavior.

Fortunately, the performance counter routines seem independent of this
nonsense.



Relevant Pages

  • RE: Sleep() is not accurate on XP P4 2.8G
    ... In XP Pro I have found Sleep() has a 15ms resolution as the default and ... GetTickCount() has 1ms resolution by default. ...
    (microsoft.public.win32.programmer.networks)
  • Re: usleep
    ... freebsd has limitation. ... | a higher resolution, designed for Multimedia applications, but the ... | There is no way for a userland application to _sleep_ for a finer ...
    (freebsd-hackers)
  • Re: Premiere Pro sound editing
    ... graph in greater detail. ... In Pro, it seems like the resolution does not ... She could start using Vegas as it's audio waveform display is very ...
    (rec.video.desktop)
  • Re: usleep
    ... Windows has a fixed resolution of non-Multimedia-Timers of around 10ms [where ... Multimedia Timers are a specific interface to sleep with a higher resolution, ... because the process might be preempted just before the timeout occurs because ... will "wake you up" as soon as the condition triggers and you can be scheduled ...
    (freebsd-hackers)
  • Re: Help! Problem on CPU usage and performance tuning.
    ... > GetTickCountfunction just as comparison with GetThreadTimes(). ... This resolution is stored in "nt! ... So you see that the resolution is better than with "GetTickCount" but it ... > test time is a way. ...
    (microsoft.public.win32.programmer.kernel)