Modify

Opened 5 months ago

Closed 5 months ago

#12744 closed Bugs (fixed)

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:

Description

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 (https://msdn.microsoft.com/windows/hardware/drivers/devtest/pwrtest).

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

Attachments (0)

Change History (2)

comment:1 Changed 5 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 5 months ago by igaztanaga

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

Add Comment

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain igaztanaga.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.