Метод | Описание | |
---|---|---|
Convert ( System.TimeSpan value, TimeUnit unit ) : double |
Expresses a TimeSpan duration in the desired TimeUnit.
|
|
DiscoverUnit ( System.TimeSpan timeSpan ) : TimeUnit |
Discover the most appropriate TimeUnit to express the given duration.
|
|
GetFromNanoSeconds ( double duration, TimeUnit timeUnit ) : double |
Converts a duration in nanoseconds to the desired TimeUnit.
|
|
GetInNanoSeconds ( double value, TimeUnit unit ) : double |
Converts a duration in nanoseconds.
|
|
ToTimeSpan ( double value, TimeUnit timeUnit ) : System.TimeSpan |
Creates a TimeSpan representing the duration expressed in TimeUnit.
|
Метод | Описание | |
---|---|---|
GetConversionFactor ( TimeUnit unit ) : long |
public static Convert ( System.TimeSpan value, TimeUnit unit ) : double | ||
value | System.TimeSpan | Duration to convert. |
unit | TimeUnit | |
Результат | double |
public static DiscoverUnit ( System.TimeSpan timeSpan ) : TimeUnit | ||
timeSpan | System.TimeSpan | /// Duration to analyze. /// |
Результат | TimeUnit |
public static GetFromNanoSeconds ( double duration, TimeUnit timeUnit ) : double | ||
duration | double | /// The duration in nanoseconds. /// |
timeUnit | TimeUnit | /// The time unit desired. /// |
Результат | double |
public static GetInNanoSeconds ( double value, TimeUnit unit ) : double | ||
value | double | Number of time units. |
unit | TimeUnit | Time unit in which duration is expressed. |
Результат | double |
public static ToTimeSpan ( double value, TimeUnit timeUnit ) : System.TimeSpan | ||
value | double | /// Duration duration. /// |
timeUnit | TimeUnit | /// Duration unit. /// |
Результат | System.TimeSpan |