C# Class HdrHistogram.Utilities.UnixTimeExtensions

Provides helper methods for working with times in Unix Epoch convention.
Mostra file Open project: HdrHistogram/HdrHistogram.NET

Public Methods

Method Description
MillisecondsSinceUnixEpoch ( this source ) : long

Gets the milliseconds elapsed since the Unix Epoch (01-Jan-1970 UTC)

SecondsSinceUnixEpoch ( this source ) : double

Gets the seconds elapsed since the Unix Epoch (01-Jan-1970 UTC)

ToDateFromMillisecondsSinceEpoch ( this millisecondsSinceUnixEpoch ) : System.DateTime

Returns the date and time specified by the milliseconds since the Unix Epoch

ToDateFromSecondsSinceEpoch ( this secondsSinceUnixEpoch ) : System.DateTime

Returns the date and time specified by the seconds since the Unix Epoch

Method Details

MillisecondsSinceUnixEpoch() public static method

Gets the milliseconds elapsed since the Unix Epoch (01-Jan-1970 UTC)
Thrown if the Kind is .
public static MillisecondsSinceUnixEpoch ( this source ) : long
source this The source time.
return long

SecondsSinceUnixEpoch() public static method

Gets the seconds elapsed since the Unix Epoch (01-Jan-1970 UTC)
Thrown if the Kind is .
public static SecondsSinceUnixEpoch ( this source ) : double
source this The source time.
return double

ToDateFromMillisecondsSinceEpoch() public static method

Returns the date and time specified by the milliseconds since the Unix Epoch
public static ToDateFromMillisecondsSinceEpoch ( this millisecondsSinceUnixEpoch ) : System.DateTime
millisecondsSinceUnixEpoch this The milliseconds since epoch
return System.DateTime

ToDateFromSecondsSinceEpoch() public static method

Returns the date and time specified by the seconds since the Unix Epoch
public static ToDateFromSecondsSinceEpoch ( this secondsSinceUnixEpoch ) : System.DateTime
secondsSinceUnixEpoch this The seconds since epoch
return System.DateTime