Exemple #1
0
 static NtTimerResolutionUtil()
 {
     WinAPI.NtQueryTimerResolution(out _max, out _min, out _actual);
     timerSetterThread = ThreadUtil.GetThread(() =>
     {
         while (true)
         {
             int newResolution = _actual;
             WinAPI.NtSetTimerResolution(newResolution, true, out _actual);
             Thread.Sleep(1000);
         }
     });
     timerSetterThread.IsBackground = true;
     timerSetterThread.Start();
 }