Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does the timeBeginPeriod API affect the system clock?

Tags:

windows

winapi

I have a Win32 application, and there are some animiation UI in my application, to make the animiation more smooth, I called timeBeginPeriod to improve the time resolution, but I found the system clock will delay some seconds if my application is running very long time. Does the timeBeginPeriod affect the system clock?

like image 957
Yigang Wu Avatar asked Jul 01 '09 08:07

Yigang Wu


People also ask

What is timeBeginPeriod?

The timeBeginPeriod function requests a minimum resolution for periodic timers.

What is Windows timer resolution?

The standard windows timer has an interval of 10 to 25 miliseconds, timer resolution claims to be able to change that to 0.5 miliseconds.


1 Answers

Good question. I didn't know this but yes it can. According to MSDN: "Use caution when calling timeBeginPeriod, as frequent calls can significantly affect the system clock, system power usage, and the scheduler."

like image 150
Twotymz Avatar answered Sep 28 '22 05:09

Twotymz