Пример #1
0
        public WinTimers()
        {
            timer          = new DispatcherTimer();
            timer.Interval = TimeSpan.FromMilliseconds(100);
            timer.Tick    += Timer_Tick;

            PerfCounter = new PerformanceCounter(timer);
            TickCounter = new TickCounter(timer);
        }
Пример #2
0
 public void Reset()
 {
     PerfCounter.Reset();
     TickCounter.Reset();
     CalculateRatio();
 }
Пример #3
0
 public void Pause()
 {
     PerfCounter.Pause();
     TickCounter.Pause();
     timer.Stop();
 }
Пример #4
0
 public void Start()
 {
     PerfCounter.Start();
     TickCounter.Start();
     timer.Start();
 }