예제 #1
0
 public static TimeSpan Divide(TimeSpan timeout, int factor)
 {
     return(timeout == TimeSpan.MaxValue
         ? TimeSpan.MaxValue
         : Ticks.ToTimeSpan((Ticks.FromTimeSpan(timeout) / factor) + 1));
 }
예제 #2
0
 public static TimeSpan Add(TimeSpan timeout1, TimeSpan timeout2)
 {
     return(Ticks.ToTimeSpan(Ticks.Add(Ticks.FromTimeSpan(timeout1), Ticks.FromTimeSpan(timeout2))));
 }