RoundedTimeSpan Constructor CleanCode C# Libraries v1.2.03 API
Initializes a new instance of the RoundedTimeSpan class.

Namespace: CleanCode.Data
Assembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
Syntax

public RoundedTimeSpan(
	long ticks,
	int precision
)

Parameters

ticks
Type: OnlineSystem Int64
A time period expressed in 100-nanosecond units.
precision
Type: OnlineSystem Int32
The non-negative precision to the right of the decimal.
Exceptions

ExceptionCondition
OnlineSystem ArgumentException Throws this exception if precision is negative.
Remarks

The algorithm used for rounding is valid only for the milliseconds of the underlying TimeSpan. Therefore the precision must be zero or greater. Attempts to use negative values (as are permitted with calls to ToString(Int32) will throw an ArgumentException.
See Also