Click or drag to resize

TicksToElapsedTimeString(Int32, Double) Method

Converts the Ticks value into a textual representation of years, days, hours, minutes and seconds with the specified number of fractional digits.

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.256-beta+0e7e94d39a9b10efe7e26e3b8d5130afc0dd4d74
Syntax
public string ToElapsedTimeString(
	int secondPrecision,
	double minimumSubSecondResolution = 0.001
)
View Source

Parameters

secondPrecision  Int32
Number of fractional digits to display for seconds.
minimumSubSecondResolution  Double  (Optional)
Minimum sub-second resolution to display. Defaults to Milli.

Return Value

String
The string representation of the value of this instance, consisting of the number of years, days, hours, minutes and seconds represented by this value.
Exceptions
ExceptionCondition
ArgumentOutOfRangeExceptionminimumSubSecondResolution is not less than or equal to Milli or minimumSubSecondResolution is not defined in Factors array.
Remarks
Set secondPrecision to -1 to suppress seconds display, this will force minimum resolution of time display to minutes.
See Also