screeninfo icon indicating copy to clipboard operation
screeninfo copied to clipboard

Get refresh rate

Open nsde opened this issue 2 years ago • 5 comments

Hello, could you please implement an attribute called .refresh_rate? I only managed to get the primary monitor's refresh rate using:

# pip install pywin32
import win32api

device = win32api.EnumDisplayDevices()
settings = win32api.EnumDisplaySettings(device.DeviceName, -1)
hz = settings.DisplayFrequency

print(hz)

I don't know how/if this works on other OSes and with multi-monitor setups.

nsde avatar Apr 06 '23 22:04 nsde

+1, could be a really useful addition

Sha-yol avatar Aug 23 '23 09:08 Sha-yol

+1, couldn't find a cross-platform way to get the monitor's refresh rate.

ShaiAvr avatar Sep 25 '23 18:09 ShaiAvr