C# Class DotNetWorkQueue.Transport.Redis.Basic.Time.BaseUnixTime

Base time client
Inherit from this to create a new time client
Inheritance: DotNetWorkQueue.Time.BaseTime, IUnixTime
Mostra file Open project: blehnen/DotNetWorkQueue

Protected Properties

Property Type Description
UnixEpoch System.DateTime

Public Methods

Method Description
DateTimeFromUnixTimestampMilliseconds ( long millis ) : System.DateTime

Returns a UTC date, based on the passed in milliseconds as unix time

GetAddDifferenceMilliseconds ( System.TimeSpan difference ) : long

Gets the current time as MS in unix time, plus the passed in timespan.

GetCurrentUnixTimestampMilliseconds ( ) : long

Gets the current time as MS in unix time

GetSubtractDifferenceMilliseconds ( System.TimeSpan difference ) : long

Gets the current time as MS in unix time, minus the passed in timespan.

Protected Methods

Method Description
BaseUnixTime ( ILogFactory log, BaseTimeConfiguration configuration ) : System

Initializes a new instance of the RedisServerUnixTime class.

GetTime ( ) : System.DateTime

Gets the time.

GetUnixTime ( ) : long

Gets the time as a long unix format; precision must be milliseconds

Method Details

BaseUnixTime() protected method

Initializes a new instance of the RedisServerUnixTime class.
protected BaseUnixTime ( ILogFactory log, BaseTimeConfiguration configuration ) : System
log ILogFactory The log.
configuration DotNetWorkQueue.Configuration.BaseTimeConfiguration The configuration.
return System

DateTimeFromUnixTimestampMilliseconds() public method

Returns a UTC date, based on the passed in milliseconds as unix time
public DateTimeFromUnixTimestampMilliseconds ( long millis ) : System.DateTime
millis long The milliseconds.
return System.DateTime

GetAddDifferenceMilliseconds() public method

Gets the current time as MS in unix time, plus the passed in timespan.
public GetAddDifferenceMilliseconds ( System.TimeSpan difference ) : long
difference System.TimeSpan The difference.
return long

GetCurrentUnixTimestampMilliseconds() public method

Gets the current time as MS in unix time
public GetCurrentUnixTimestampMilliseconds ( ) : long
return long

GetSubtractDifferenceMilliseconds() public method

Gets the current time as MS in unix time, minus the passed in timespan.
public GetSubtractDifferenceMilliseconds ( System.TimeSpan difference ) : long
difference System.TimeSpan The difference.
return long

GetTime() protected method

Gets the time.
protected GetTime ( ) : System.DateTime
return System.DateTime

GetUnixTime() protected abstract method

Gets the time as a long unix format; precision must be milliseconds
protected abstract GetUnixTime ( ) : long
return long

Property Details

UnixEpoch protected_oe static_oe property

The unix epoch
Use this to turn a UTC date into a unix time stamp
protected static DateTime,System UnixEpoch
return System.DateTime