Class TimeSpanUtils
Helper methods for System.TimeSpan.
public static class TimeSpanUtils
- Inheritance
-
objectTimeSpanUtils
Methods
Divide(TimeSpan, double)
Divides the timespan by a factor.
[Pure]
public static TimeSpan Divide(this TimeSpan timeSpan, double factor)
Parameters
timeSpanTimeSpanfactordouble
Returns
- TimeSpan
Divide(TimeSpan, TimeSpan)
Divides two timespans, returning the quotient.
[Pure]
public static double Divide(this TimeSpan timeSpan, TimeSpan other)
Parameters
timeSpanTimeSpanotherTimeSpan
Returns
- double
FromSecondsAccurate(double)
Like System.TimeSpan.FromSeconds(double), but with higher-than-millisecond accuracy.
[Pure]
public static TimeSpan FromSecondsAccurate(double seconds)
Parameters
secondsdouble
Returns
- TimeSpan
Multiply(TimeSpan, double)
Multiplies the timespan by a factor.
[Pure]
public static TimeSpan Multiply(this TimeSpan timeSpan, double factor)
Parameters
timeSpanTimeSpanfactordouble
Returns
- TimeSpan