Struct UnixMillisecondTime
An instant measured in milliseconds since the Unix epoch.
Assembly: LaunchDarkly.CommonSdk.dll
Syntax
[JsonConverter(typeof(LdJsonConverters.UnixMillisecondTimeConverter))]
public struct UnixMillisecondTime : IEquatable<UnixMillisecondTime>, IComparable<UnixMillisecondTime>, IJsonSerializable
Fields
Epoch
The instant that defines the beginning of Unix time.
Declaration
public static readonly DateTime Epoch
Field Value
Properties
AsDateTime
Converts this value to a DateTime
.
Declaration
public DateTime AsDateTime { get; }
Property Value
Now
Gets the current date/time as a UnixMillisecondTime
.
Declaration
public static UnixMillisecondTime Now { get; }
Property Value
Value
The millisecond time value.
Declaration
public long Value { get; }
Property Value
Methods
CompareTo(UnixMillisecondTime)
Declaration
public int CompareTo(UnixMillisecondTime other)
Parameters
Returns
Equals(UnixMillisecondTime)
Declaration
public bool Equals(UnixMillisecondTime other)
Parameters
Returns
Equals(object)
Declaration
public override bool Equals(object other)
Parameters
Type |
Name |
Description |
object |
other |
|
Returns
Overrides
FromDateTime(DateTime)
Converts a DateTime
to UnixMillisecondTime
.
Declaration
public static UnixMillisecondTime FromDateTime(DateTime dateTime)
Parameters
Type |
Name |
Description |
DateTime |
dateTime |
a DateTime
|
Returns
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
OfMillis(long)
Creates a UnixMillisecondTime
value.
Declaration
public static UnixMillisecondTime OfMillis(long millis)
Parameters
Type |
Name |
Description |
long |
millis |
the millisecond time value
|
Returns
PlusMillis(long)
Computes a new time based on a offset in milliseconds from this one.
Declaration
public UnixMillisecondTime PlusMillis(long millis)
Parameters
Type |
Name |
Description |
long |
millis |
a positive or negative number of milliseconds
|
Returns
Operators
operator ==(UnixMillisecondTime, UnixMillisecondTime)
Declaration
public static bool operator ==(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Returns
operator >(UnixMillisecondTime, UnixMillisecondTime)
Declaration
public static bool operator >(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Returns
operator >=(UnixMillisecondTime, UnixMillisecondTime)
Declaration
public static bool operator >=(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Returns
operator !=(UnixMillisecondTime, UnixMillisecondTime)
Declaration
public static bool operator !=(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Returns
operator <(UnixMillisecondTime, UnixMillisecondTime)
Declaration
public static bool operator <(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Returns
operator <=(UnixMillisecondTime, UnixMillisecondTime)
Declaration
public static bool operator <=(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Returns
Implements