示例#1
0
        private int GetTimerResolution()
        {
            /* Query the timer resolution from Windows API */
            TimerCaps caps = WinApiCalls.QueryTimerResolution();

            return((int)(caps.PeriodCurrent / 10000.0));
        }
        public static TimerCaps QueryTimerResolution()
        {
            var caps = new TimerCaps();

            NtQueryTimerResolution(out caps.PeriodMin, out caps.PeriodMax, out caps.PeriodCurrent);
            return(caps);
        }