comparison ServerMonitor/Objects/Schedule.cs @ 4:3142e52cbe69

Lots more progress
author Brad Greco <brad@bgreco.net>
date Sun, 10 Feb 2019 20:51:26 -0500
parents 3e1a2131f897
children 052aa62cb42a
comparison
equal deleted inserted replaced
3:96f0b028176d 4:3142e52cbe69
39 else 39 else
40 { 40 {
41 // If the last run time was more than a day ago, fast-forward to reduce the number of loops 41 // If the last run time was more than a day ago, fast-forward to reduce the number of loops
42 if (nextTime < minStartTime.AddHours(-24)) 42 if (nextTime < minStartTime.AddHours(-24))
43 nextTime = minStartTime.Date.Add(StartTime).AddHours(-24); 43 nextTime = minStartTime.Date.Add(StartTime).AddHours(-24);
44 //TODO handle start time and end time
45 while (nextTime < minStartTime) 44 while (nextTime < minStartTime)
46 { 45 {
47 switch (Units) 46 switch (Units)
48 { 47 {
49 case FrequencyUnits.Second: nextTime = nextTime.AddSeconds(Frequency); break; 48 case FrequencyUnits.Second: nextTime = nextTime.AddSeconds(Frequency); break;