Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Timers and ExSetTimerResolution

Timers and ExSetTimerResolution

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpquestioncode-review
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    LiamD
    wrote on last edited by
    #1

    From the information that I have gathered it appears that XP has a limit in the resolution of timers (10-15 ms). So even though each timer can take a resoltion of 1 ms this cannot be achived in practice due to the OS limitation. I believe that ExSetTimerResolution can be used to change this. Has anyone tried to achive this in .NET? How did you do it? Did it improve timer resolution? Thanks, Liam

    D 1 Reply Last reply
    0
    • L LiamD

      From the information that I have gathered it appears that XP has a limit in the resolution of timers (10-15 ms). So even though each timer can take a resoltion of 1 ms this cannot be achived in practice due to the OS limitation. I believe that ExSetTimerResolution can be used to change this. Has anyone tried to achive this in .NET? How did you do it? Did it improve timer resolution? Thanks, Liam

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      You can't improve the resolution of the timers beyond 10-15ms. It's just plain impossible. If you want sub-10ms resolution, you have to use the high performance counter built into the NT kernel, using QueryPerformanceCounter API function. There are examples of this in the CP articles, like this[^] one. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups