void TimerProcess() { _timer = new JocysCom.ClassLibrary.HiResTimer(); _timer.Interval = (int)Frequency; _timer.Elapsed += Timer_Elapsed; _timer.Start(); // Wait here until all items returns to the pool. TimerSemaphore.Wait(); _timer.Dispose(); }
public override void Stop() { lock (monitorLock) { // If server is running then... if (_Timer != null) { _Timer.Dispose(); _Timer = null; } _IsRunning = false; } }
public void Stop() { lock (timerLock) { if (_timer == null) { return; } _timer.Stop(); _timer.Dispose(); _timer = null; } }
public void Start() { lock (timerLock) { if (_timer != null) { return; } _timer = new JocysCom.ClassLibrary.HiResTimer(2, "MainWindowTimer"); _timer.Elapsed += Timer_Elapsed; _timer.Start(); } }
public void Start() { lock (timerLock) { if (_timer != null) { return; } _timer = new JocysCom.ClassLibrary.HiResTimer(); _timer.Elapsed += Timer_Elapsed; _timer.Interval = 2; _timer.Start(); } }
public void Start() { lock (timerLock) { if (_timer != null) { return; } watch.Restart(); _timer = new JocysCom.ClassLibrary.HiResTimer(); _timer.Elapsed += Timer_Elapsed; _timer.Interval = (int)Frequency; _timer.Start(); } }
public void Stop() { lock (timerLock) { if (_timer == null) { return; } _timer.Stop(); _timer.Dispose(); _timer = null; _AllowThreadToRun = false; _ResetEvent.Set(); } }
public void Start() { lock (timerLock) { if (_timer != null) { return; } watch.Restart(); _timer = new JocysCom.ClassLibrary.HiResTimer((int)Frequency, "DInputHelperTimer"); _timer.Elapsed += Timer_Elapsed; _timer.Start(); _AllowThreadToRun = true; RefreshAllAsync(); } }
public DInputHelper() { _timer = new JocysCom.ClassLibrary.HiResTimer(); _timer.Elapsed += Timer_Elapsed; CombinedXiConencted = new bool[4]; CombinedXiStates = new State[4]; LiveXiControllers = new Controller[4]; LiveXiConnected = new bool[4]; LiveXiStates = new State[4]; for (int i = 0; i < 4; i++) { CombinedXiStates[i] = new State(); LiveXiControllers[i] = new Controller((UserIndex)i); LiveXiStates[i] = new State(); } watch = new System.Diagnostics.Stopwatch(); }
public DInputHelper() { _timer = new JocysCom.ClassLibrary.HiResTimer(); _timer.Elapsed += Timer_Elapsed; TimerSemaphore = new SemaphoreSlim(0); Manager = new DirectInput(); InitDeviceDetector(); CombinedXiConencted = new bool[4]; CombinedXiStates = new State[4]; LiveXiControllers = new Controller[4]; LiveXiConnected = new bool[4]; LiveXiStates = new State[4]; for (int i = 0; i < 4; i++) { CombinedXiStates[i] = new State(); LiveXiControllers[i] = new Controller((UserIndex)i); LiveXiStates[i] = new State(); } watch = new System.Diagnostics.Stopwatch(); }
public override void Start() { lock (monitorLock) { if (IsDisposing) { return; } if (_Timer != null) { // Server is already running; return; } _Timer = new JocysCom.ClassLibrary.HiResTimer(); _Timer.Interval = ScanInterval; //_Timer.AutoReset = false; _Timer.Elapsed += _Timer_Elapsed; _Timer.Start(); _IsRunning = true; } }