Beispiel #1
0
 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();
 }
Beispiel #2
0
 public void Start()
 {
     lock (timerLock)
     {
         if (_timer != null)
         {
             return;
         }
         _timer          = new JocysCom.ClassLibrary.HiResTimer(2, "MainWindowTimer");
         _timer.Elapsed += Timer_Elapsed;
         _timer.Start();
     }
 }
Beispiel #3
0
 public void Start()
 {
     lock (timerLock)
     {
         if (_timer != null)
         {
             return;
         }
         _timer          = new JocysCom.ClassLibrary.HiResTimer();
         _timer.Elapsed += Timer_Elapsed;
         _timer.Interval = 2;
         _timer.Start();
     }
 }
Beispiel #4
0
 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();
     }
 }
Beispiel #5
0
 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;
     }
 }
Beispiel #7
0
        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();
        }
Beispiel #8
0
        //ThreadStart _ThreadStart;
        //Thread _Thread;

        public void Start()
        {
            watch.Restart();
            _timer.Interval = (int)Frequency;
            _timer.Start();
        }