public WinTimers() { timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromMilliseconds(100); timer.Tick += Timer_Tick; PerfCounter = new PerformanceCounter(timer); TickCounter = new TickCounter(timer); }
public void Reset() { PerfCounter.Reset(); TickCounter.Reset(); CalculateRatio(); }
public void Pause() { PerfCounter.Pause(); TickCounter.Pause(); timer.Stop(); }
public void Start() { PerfCounter.Start(); TickCounter.Start(); timer.Start(); }