TimeSpanExtensionsToElapsedTimeString(TimeSpan, Int32, Double) Method
Converts the TimeSpan value into a textual representation of years, days, hours,
minutes and seconds with the specified number of fractional digits.
Namespace: Gemstone.TimeSpanExtensionsAssembly: Gemstone.Common (in Gemstone.Common.dll) Version: 1.0.128 -- Release Build+d050cfc5563c89a1188cc3c6b2d417530856f490
public static string ToElapsedTimeString(
this TimeSpan value,
int secondPrecision = 2,
double minimumSubSecondResolution = 0.001
)
<ExtensionAttribute>
Public Shared Function ToElapsedTimeString (
value As TimeSpan,
Optional secondPrecision As Integer = 2,
Optional minimumSubSecondResolution As Double = 0.001
) As String
public:
[ExtensionAttribute]
static String^ ToElapsedTimeString(
TimeSpan value,
int secondPrecision = 2,
double minimumSubSecondResolution = 0.001
)
Gemstone.TimeSpanExtensions.TimeSpanExtensions.ToElapsedTimeString = function(value, secondPrecision, minimumSubSecondResolution);
- 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.
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.
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).
Set second precision to -1 to suppress seconds display.
ArgumentOutOfRangeException | minimumSubSecondResolution is not less than or equal to Milli or
minimumSubSecondResolution is not defined in Factors array.
|