Table of Contents

Class TimeSpanUtils

Namespace
NanoByte.Common
Assembly
NanoByte.Common.dll

Helper methods for TimeSpan.

public static class TimeSpanUtils
Inheritance
object
TimeSpanUtils

Methods

Divide(TimeSpan, double)

Divides the timespan by a factor.

public static TimeSpan Divide(this TimeSpan timeSpan, double factor)

Parameters

timeSpan TimeSpan
factor double

Returns

TimeSpan

Divide(TimeSpan, TimeSpan)

Divides two timespans, returning the quotient.

public static double Divide(this TimeSpan timeSpan, TimeSpan other)

Parameters

timeSpan TimeSpan
other TimeSpan

Returns

double

FromSecondsAccurate(double)

Like FromSeconds(double), but with higher-than-millisecond accuracy.

public static TimeSpan FromSecondsAccurate(double seconds)

Parameters

seconds double

Returns

TimeSpan

Multiply(TimeSpan, double)

Multiplies the timespan by a factor.

public static TimeSpan Multiply(this TimeSpan timeSpan, double factor)

Parameters

timeSpan TimeSpan
factor double

Returns

TimeSpan