Click or drag to resize

TimeSpanExtensions Class

Fix for TimeSpan: TimeSpan.FromSeconds is rounding the resulting time span to integer milliseconds.
Inheritance Hierarchy
SystemObject
  AltaxoTimeSpanExtensions

Namespace: Altaxo
Assembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3572.0 (4.8.3572.0)
Syntax
C#
public static class TimeSpanExtensions

The TimeSpanExtensions type exposes the following members.

Methods
 NameDescription
Public methodStatic memberFromSecondsAccurate Constructs a TimeSpan from the provided seconds exactly (without rounding to milliseconds).
Public methodStatic memberMax Returns the larger of two time spans.
Public methodStatic memberMin Returns the smaller of two time spans.
Public Extension MethodSafeAddition(TimeSpan, Double) Adds a number of seconds to a time span while clamping the result to the valid TimeSpan range.
Public Extension MethodSafeAddition(TimeSpan, TimeSpan) Adds two time spans while clamping the result to the valid TimeSpan range.
Top
See Also