Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#Actualsamoth

Posted 13 November 2013 - 06:46 AM

 


Waitable-timer resolution is the same as  the system timer resolution.

Do the he said what??

Citation needed.

 

A waitable timer as as accurate as any other event, which is nearly down to the microsecond.Though of course no guarantees.

Plus, a waitable timer will cause a waiting thread to be scheduled over its siblings by giving it a priority boost. Sleep simply makes a thread "ready" after the rounded-up time is over. Which means it may get to run some time later. On non-server editions of Windows, this usually means 2 quantums, since that is the default scheduler unit.

 

A waitable timer makes the waiting thread ready and higher priority at the exact time the time is up. Due to the way the Windows scheduler works (serving top-down by priority), this makes a huge difference.

It still does not guarantee that the thread will run immediately, but it guarantees that it will the the first one in its group of similar-base-priority thread peers at the next opportunity. It also means that it may interrupt a peer thread before the assigned number of quantums are over.


#2samoth

Posted 13 November 2013 - 06:46 AM

 


Waitable-timer resolution is the same as  the system timer resolution.

Do the he said what??

Citation needed.

 

A waitable timer as as accurate as any other event, which is nearly down to the microsecond.Though of course no guarantees.

Plus, a waitable timer will cause a waiting thread to be scheduled over its siblings by giving it a priority boost. Sleep simply makes a thread "ready" after the rounded-up time is over. Which means it may get to run some time later. On non-server editions of Windows, this usually means 2 quantums, since that is the default scheduler unit.

 

A waitable timer makes the waiting thread ready and higher priority at the exact time the time is up. Which still does not guarantee that it will run immediately, but it guarantees that it will the the first one in its group of similar-base-priority thread peers at the next opportunity. It also means that it may interrupt a peer thread before the assigned number of quantums are over.

Due to the way the Windows scheduler works (serving top-down by priority), this makes a huge difference.


#1samoth

Posted 13 November 2013 - 06:42 AM

 


Waitable-timer resolution is the same as  the system timer resolution.

Do the he said what??

Citation needed.

 

A waitable timer as as accurate as any other event, which is nearly down to the microsecond.Though of course no guarantees.

Plus, a waitable timer will cause a waiting thread to be scheduled over its siblings by giving it a priority boost. Sleep simply makes a thread "ready" after the rounded-up time is over. A waitable timer makes it ready and higher priority at the exact time the time is up.

Due to the way the Windows scheduler works (serving top-down by priority), this makes a huge difference.


PARTNERS