|   | TimeSpanExtensionsToElapsedTimeString Method | 
        
        
            Converts the 
TimeSpan value into a textual representation of years, days, hours,
            minutes and seconds with the specified number of fractional digits.
            
 GSF.Core (in GSF.Core.dll) Version: 2.4.257-beta+00aa2366fbb9ec75f636ebc7cfa610e3826a727c
 Syntax
Syntaxpublic static string ToElapsedTimeString(
	this TimeSpan value,
	int secondPrecision = 2,
	double minimumSubSecondResolution = 0.001
)
[<ExtensionAttribute>]
static member ToElapsedTimeString : 
        value : TimeSpan * 
        ?secondPrecision : int * 
        ?minimumSubSecondResolution : float 
(* Defaults:
        let _secondPrecision = defaultArg secondPrecision 2
        let _minimumSubSecondResolution = defaultArg minimumSubSecondResolution 0.001
*)
-> string GSF.TimeSpanExtensions.ToElapsedTimeString = function(value, secondPrecision, minimumSubSecondResolution);
Parameters
- value  TimeSpan
- The TimeSpan to process.
- secondPrecision  Int32  (Optional)
- Number of fractional digits to display for seconds. Defaults to 2.
- minimumSubSecondResolution  Double  (Optional)
- Minimum sub-second resolution to display. Defaults to Milli.
Return Value
String
            The string representation of the value of this 
TimeSpan, consisting of the number of
            years, days, hours, minutes and seconds represented by this value.
            
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type 
TimeSpan. When you use instance method syntax to call this method, omit the first parameter. For more information, see 
Extension Methods (Visual Basic) or 
Extension Methods (C# Programming Guide).
 Exceptions
Exceptions Remarks
RemarksSet second precision to -1 to suppress seconds display.
 Example
Example
              DateTime g_start = DateTime.UtcNow;
              DateTime EndTime = DateTime.UtcNow;
              TimeSpan duration = EndTime.Subtract(g_start);
              Console.WriteLine("Elapsed Time = " + duration.ToElapsedTimeString());
            
 See Also
See Also