System.Windows.Forms.XplatUIX11.CheckTimers C# (CSharp) Method

CheckTimers() private method

private CheckTimers ( ArrayList timers, System.DateTime now ) : void
timers System.Collections.ArrayList
now System.DateTime
return void
		private void CheckTimers (ArrayList timers, DateTime now) {
			int count;

			count = timers.Count;

			if (count == 0)
				return;

			for (int i = 0; i < timers.Count; i++) {
				Timer timer;

				timer = (Timer) timers [i];

				if (timer.Enabled && timer.Expires <= now && !timer.Busy) {
					// Timer ticks:
					//  - Before MainForm.OnLoad if DoEvents () is called.
					//  - After MainForm.OnLoad if not.
					//
					if (in_doevents ||
					    (Application.MWFThread.Current.Context != null && 
					     (Application.MWFThread.Current.Context.MainForm == null || 
					      Application.MWFThread.Current.Context.MainForm.IsLoaded))) {
						timer.Busy = true;
						timer.Update (now);
						timer.FireTick ();
						timer.Busy = false;
					}
				}
			}
		}
XplatUIX11