Why are .NET timers limited to 15 ms resolution?

后端 未结 3 1907
一生所求
一生所求 2020-11-22 05:05

Note that I\'m asking about something that will call a callback function more often than once every 15 ms using something like System.Threading.Timer. I\'m not

3条回答
  •  时光取名叫无心
    2020-11-22 05:48

    All replays here are about system timer resolution. But .net timers not respect it. As author notice by himself:

    that the runtime implements its own timer queue that is similar to the Timer Queue Timers, but never actually calls the Win32 functions.

    And Jan pointed in comment.

    So, answers above are good info, but not directly correlated to .net timers and therefore misleading people :(

    Short answer to both author questions is by design. Why did they decide to go this way? Feared about whole system performance? Who knows...
    To not duplicate, see more info on both questions (and ways to implement precise timers on .net) in Jan's correlated topic.

提交回复
热议问题