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 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 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 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; } }
void TimerProcess() { // Create device form. deviceForm = new System.Windows.Forms.Form(); deviceForm.Text = "X360CE Force Feedback Form"; deviceForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; deviceForm.MinimizeBox = false; deviceForm.MaximizeBox = false; deviceForm.ShowInTaskbar = false; // Force to create handle. var handle = deviceForm.Handle; // Set timer. _timer.Interval = (int)Frequency; _timer.Start(); // Wait here until all items returns to the pool. TimerSemaphore.Wait(); _timer.Stop(); // Dispose form on the same thread as it was created. deviceForm.Dispose(); }
//ThreadStart _ThreadStart; //Thread _Thread; public void Start() { watch.Restart(); _timer.Interval = (int)Frequency; _timer.Start(); }