internal bool CheckDuration(Time testDuration) { if ((this.ActivityType == Activity.PrimaryWork) | (this.ActivityType == Activity.WorkBasedBusiness)) { // Check to see if the test duration is the same as the one we are in return(this.OriginalDuration == testDuration); } else { return(Scheduler.PercentOverlapAllowed * Distribution.TashaTimeToDistribution(this.OriginalDuration) <= Distribution.TashaTimeToDistribution(testDuration)); } }