Ticket #12744 (closed Bugs: fixed)

Opened 4 months ago

Last modified 3 months ago

winapi::set_timer_resolution inadvertently changes timer resolution (Windows)

Reported by: Terry Kim <yuminkim@…> Owned by: igaztanaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.63.0 Severity: Problem
Keywords: timer resolution Cc:


boost::interprocess::ipcdetail::spin_wait calls get_system_tick_in_highres_counts(), which ultimately calls winapi::set_timer_resolution() to get the current timer resolution. However, this changes the timer resolution inadvertently.

I verified this with PwrTest?.exe (

Can we use winapi::query_timer_resolution() instead of winapi::set_timer_resolution()?


Change History

comment:1 Changed 3 months ago by igaztanaga

In theory the second parameter is set_timer_resolution is zero, which should not change the current resolution. But if you verified the change, then your suggestion seems the right way to go.

comment:2 Changed 3 months ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.