Parcourir la Source

Added some delays for performance reasons

Bryan Allred 10 ans auparavant
Parent
Commettre
82e0bc4e6b
1 fichiers modifiés avec 9 ajouts et 2 suppressions
  1. 9 2
      Program.cs

+ 9 - 2
Program.cs

40
			{
40
			{
41
				while (!a.Cancel)
41
				while (!a.Cancel)
42
				{
42
				{
43
					if (Sound.Queue.Count > 0)
43
					while (Sound.Queue.Count > 0)
44
					{
44
					{
45
						Sound.Queue.Dequeue()();
45
						Sound.Queue.Dequeue()();
46
					}
46
					}
47
48
					// Pause.
49
					new AutoResetEvent(false).WaitOne(new TimeSpan(0, 1, 0));
47
				}
50
				}
48
			};
51
			};
49
			soundBoard.RunWorkerAsync();
52
			soundBoard.RunWorkerAsync();
133
				dashboard.Cache();
136
				dashboard.Cache();
134
				dashboard.Update();
137
				dashboard.Update();
135
138
136
				worker.RunWorkerAsync();
139
				var pause = new AutoResetEvent(false);
140
				if (pause.WaitOne(new TimeSpan(0, 15, 0)))
141
				{
142
					worker.RunWorkerAsync();
143
				}
137
			};
144
			};
138
			worker.RunWorkerAsync();
145
			worker.RunWorkerAsync();
139
146