Browse Source

Added some delays for performance reasons

Bryan Allred 10 years ago
parent
commit
82e0bc4e6b
1 changed files with 9 additions and 2 deletions
  1. 9 2
      Program.cs

+ 9 - 2
Program.cs

@ -40,10 +40,13 @@ namespace pulse
40 40
			{
41 41
				while (!a.Cancel)
42 42
				{
43
					if (Sound.Queue.Count > 0)
43
					while (Sound.Queue.Count > 0)
44 44
					{
45 45
						Sound.Queue.Dequeue()();
46 46
					}
47
48
					// Pause.
49
					new AutoResetEvent(false).WaitOne(new TimeSpan(0, 1, 0));
47 50
				}
48 51
			};
49 52
			soundBoard.RunWorkerAsync();
@ -133,7 +136,11 @@ namespace pulse
133 136
				dashboard.Cache();
134 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 145
			worker.RunWorkerAsync();
139 146