void DoServerTrackingLater(Action onTimeout) { lazyServerTrackingTimer?.Release(); lazyServerTrackingTimer = null; lazyServerTrackingTimer = new Libs.Sys.CancelableTimeout(onTimeout, 2000); lazyServerTrackingTimer.Start(); }
void WakeupLazyProxyUpdater() { if (lazyProxyUpdateTimer == null) { lazyProxyUpdateTimer = new Libs.Sys.CancelableTimeout( LazyProxyUpdater, 2000); } lazyProxyUpdateTimer.Start(); }
void LazyCustomPacFileCacheUpdate() { if (lazyCustomPacFileCacheUpdateTimer == null) { lazyCustomPacFileCacheUpdateTimer = new Libs.Sys.CancelableTimeout( UpdateCustomPacCache, 2000); } lazyCustomPacFileCacheUpdateTimer.Start(); }
void LazyInvokeOnPacServerStateChange() { // Create on demand. if (lazyStateChangeTimer == null) { lazyStateChangeTimer = new Libs.Sys.CancelableTimeout( () => { try { OnPACServerStateChanged?.Invoke(this, EventArgs.Empty); } catch { } }, 1000); } lazyStateChangeTimer.Start(); }