Skip to content

Instantly share code, notes, and snippets.

@jenshnielsen
Last active December 8, 2020 09:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jenshnielsen/4ed1ee1e73c858550d46f4f881d1381e to your computer and use it in GitHub Desktop.
Save jenshnielsen/4ed1ee1e73c858550d46f4f881d1381e to your computer and use it in GitHub Desktop.
from ctypes import byref, windll
from ctypes.wintypes import PULONG, LONG
import time
MinimumResolution = LONG()
MaximumResolution = LONG()
CurrentResolution = LONG()
windll.ntdll.NtQueryTimerResolution(byref(MinimumResolution), byref(MaximumResolution), byref(CurrentResolution))
print(f"Minimum {MinimumResolution}, "
f"Maximum {MaximumResolution}, "
f"Current {CurrentResolution}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment