private static void MultipleAsyncJobTimer() { DateTime now = DateTime.Now; Delegate d = new dOutput(Output); IScheduledItem item; item = new SimpleInterval(now, new TimeSpan(0, 0, 1)); _Timer.AddAsyncJob(item, d, "one"); item = new SimpleInterval(now, new TimeSpan(0, 0, 3)); _Timer.AddAsyncJob(item, d, "three"); item = new SimpleInterval(now, new TimeSpan(0, 0, 2)); _Timer.AddAsyncJob(item, d, "two"); _Timer.Error += new ExceptionEventHandler(_Timer_Error); _Timer.Start(); }
static void MultipleAsyncJobTimer() { var now = DateTime.Now; var d = new OrderedOutput(Output); var item = new SimpleInterval(now, new TimeSpan(0, 0, 1)); Timer.AddAsyncJob(item, d, "one"); item = new SimpleInterval(now, new TimeSpan(0, 0, 3)); Timer.AddAsyncJob(item, d, "three"); item = new SimpleInterval(now, new TimeSpan(0, 0, 2)); Timer.AddAsyncJob(item, d, "two"); Timer.Error += Timer_Error; Timer.Start(); }