Table of Contents

Ceiling Method

Definition

Namespace
Cuemon.Extensions
Assemblies
Cuemon.Extensions.Core.dll
Source
src/Cuemon.Extensions.Core/TimeSpanExtensions.cs

Ceiling(TimeSpan, TimeSpan)

Returns a TimeSpan value that is rounded towards positive infinity.

public static TimeSpan Ceiling(this TimeSpan value, TimeSpan interval)

Parameters

value TimeSpan

A TimeSpan value to be rounded.

interval TimeSpan

The TimeSpan value that specifies the rounding of value.

Returns

TimeSpan

A TimeSpan value that is rounded towards positive infinity.

Ceiling(TimeSpan, double, TimeUnit)

Returns a TimeSpan value that is rounded towards positive infinity.

public static TimeSpan Ceiling(this TimeSpan value, double interval, TimeUnit timeUnit)

Parameters

value TimeSpan

A TimeSpan value to be rounded.

interval double

The double value that in combination with timeUnit specifies the rounding of value.

timeUnit TimeUnit

One of the enumeration values that specifies the time unit of interval.

Returns

TimeSpan

A TimeSpan value that is rounded towards positive infinity.