|
TicksToElapsedTimeString(Int32, String, Double) Method
|
Converts the
Ticks value into a textual representation of years, days, hours,
minutes and seconds with the specified number of fractional digits given string array of
time names.
Namespace: GSFAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax public string ToElapsedTimeString(
int secondPrecision,
string[] timeNames,
double minimumSubSecondResolution = 0.001
)
Public Function ToElapsedTimeString (
secondPrecision As Integer,
timeNames As String(),
Optional minimumSubSecondResolution As Double = 0.001
) As String
public:
String^ ToElapsedTimeString(
int secondPrecision,
array<String^>^ timeNames,
double minimumSubSecondResolution = 0.001
)
member ToElapsedTimeString :
secondPrecision : int *
timeNames : string[] *
?minimumSubSecondResolution : float
(* Defaults:
let _minimumSubSecondResolution = defaultArg minimumSubSecondResolution 0.001
*)
-> string
function ToElapsedTimeString(secondPrecision, timeNames, minimumSubSecondResolution);
View SourceParameters
- secondPrecision Int32
- Number of fractional digits to display for seconds.
- timeNames String
- Time names array to use during textual conversion.
- 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 Remarks
Set secondPrecision to -1 to suppress seconds display, this will
force minimum resolution of time display to minutes.
timeNames array needs one string entry for each of the following names:
" year", " years", " day", " days", " hour", " hours", " minute", " minutes", " second", " seconds", "less than ".
See Also