MonoDevelop.Projects.Formats.MSBuild.MSBuildProjectService.ScheduleProjectBuilderCleanup C# (CSharp) Method

ScheduleProjectBuilderCleanup() static private method

static private ScheduleProjectBuilderCleanup ( System.DateTime cleanupTime ) : void
cleanupTime System.DateTime
return void
		static void ScheduleProjectBuilderCleanup (DateTime cleanupTime)
		{
			lock (builders) {
				if (cleanupTime < nextCleanup)
					return;
				nextCleanup = cleanupTime;
				System.Threading.ThreadPool.QueueUserWorkItem (delegate {
					DateTime tnow = DateTime.Now;
					while (tnow < nextCleanup) {
						System.Threading.Thread.Sleep ((int)(nextCleanup - tnow).TotalMilliseconds);
						CleanProjectBuilders ();
						tnow = DateTime.Now;
					}
				});
			}
		}