public void Stop() { if (_timer != null) { //Debug.WriteLine("InactivityTimer stopping timer"); _timer.Stop(); _timer = null; } _paused = true; }
protected void ResetTimer() { //Debug.WriteLine($"InactivityTimer ResetTimer timer {_paused}"); if (_paused) { return; } if (_timer != null) { _timer.Stop(); _timer = null; } if (_callback == null) { return; } _timer = new MyTimer(_timeout, _callback); _timer.Start(); }