Yigang Wu
Yigang Wu

Reputation: 3592

Does the timeBeginPeriod API affect the system clock?

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?

Upvotes: 6

Views: 2288

Answers (2)

Arno
Arno

Reputation: 5194

A call to timeBeginPeriod changes the systems interrupt period. As a consequence the update rate and the update increment of the system time changes accordingly. This answer proves a closer look at system time and timeBeginPeriod.

Upvotes: 2

Twotymz
Twotymz

Reputation: 412

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."

Upvotes: 3

Related Questions