public SimpleTimePeriod(SimpleTime start, SimpleTime end) {
            if (start.TotalSecond <= end.TotalSecond) {
                this.end = end;
                this.start = start;
            }
            else {
                this.end = start;
                this.start = end;
            }

        }
Example #2
0
 public bool isBetween(SimpleTime t1, SimpleTime t2) {
     int s1 = t1.TotalSecond;
     int s2 = t2.TotalSecond;
     int s = this.TotalSecond;
     return (s1 <= s && s <= s2) || (s1 >= s && s >= s2);
 }
Example #3
0
 public bool isBefore(SimpleTime anotherTime) {
     return this.TotalSecond <= anotherTime.TotalSecond;
 }
Example #4
0
 public SimpleTime getAfter(SimpleTime time) {
     return new SimpleTime(this.TotalSecond + time.TotalSecond);
 }
Example #5
0
 public SimpleTime getBefore(SimpleTime time) {
     return new SimpleTime(this.TotalSecond - time.TotalSecond);
 }
 public SimpleTimePeriod(SimpleTime start, SimpleTime end, String name) : this(start, end){
     this.name = name;
 }