C# 클래스 NFluent.Helpers.TimeHelper

Static class hosting various time helper.
파일 보기 프로젝트 열기: tpierrain/NFluent 1 사용 예제들

공개 메소드들

메소드 설명
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

메소드 상세

Convert() 공개 정적인 메소드

Expresses a TimeSpan duration in the desired TimeUnit.
Raised if time unit is not recognized.
public static Convert ( System.TimeSpan value, TimeUnit unit ) : double
value System.TimeSpan Duration to convert.
unit TimeUnit to convert to.
리턴 double

DiscoverUnit() 공개 정적인 메소드

Discover the most appropriate TimeUnit to express the given duration.
public static DiscoverUnit ( System.TimeSpan timeSpan ) : TimeUnit
timeSpan System.TimeSpan /// Duration to analyze. ///
리턴 TimeUnit

GetFromNanoSeconds() 공개 정적인 메소드

Converts a duration in nanoseconds to the desired TimeUnit.
/// Raised if time unit is not recognized. ///
public static GetFromNanoSeconds ( double duration, TimeUnit timeUnit ) : double
duration double /// The duration in nanoseconds. ///
timeUnit TimeUnit /// The time unit desired. ///
리턴 double

GetInNanoSeconds() 공개 정적인 메소드

Converts a duration in nanoseconds.
Raised if time unit is not recognized.
public static GetInNanoSeconds ( double value, TimeUnit unit ) : double
value double Number of time units.
unit TimeUnit Time unit in which duration is expressed.
리턴 double

ToTimeSpan() 공개 정적인 메소드

Creates a TimeSpan representing the duration expressed in TimeUnit.
Raised if time unit is not recognized.
public static ToTimeSpan ( double value, TimeUnit timeUnit ) : System.TimeSpan
value double /// Duration duration. ///
timeUnit TimeUnit /// Duration unit. ///
리턴 System.TimeSpan