Show / Hide Table of Contents

Class UnixMillisecondTime

An instant measured in milliseconds since the Unix epoch.

Inheritance
System.Object
UnixMillisecondTime
Implements
System.IEquatable<UnixMillisecondTime>
System.IComparable<UnixMillisecondTime>
IJsonSerializable
Namespace: LaunchDarkly.Sdk
Assembly: LaunchDarkly.CommonSdk.dll
Syntax
public sealed class UnixMillisecondTime : ValueType, IEquatable<UnixMillisecondTime>, IComparable<UnixMillisecondTime>, IJsonSerializable
Remarks

LaunchDarkly services internally use this method of representing a date/timestamp as an integer. For instance, it is used for the creation time property of an analytics event. You do not need to refer to this type during normal usage of LaunchDarkly SDKs, but it is public and supported for convenience.

When converting to or from JSON, it is encoded as an integer.

Fields

Epoch

The instant that defines the beginning of Unix time.

Declaration
public static readonly DateTime Epoch
Field Value
Type Description
System.DateTime

Properties

AsDateTime

Converts this value to a DateTime.

Declaration
public DateTime AsDateTime { get; }
Property Value
Type Description
System.DateTime

Now

Gets the current date/time as a UnixMillisecondTime.

Declaration
public static UnixMillisecondTime Now { get; }
Property Value
Type Description
UnixMillisecondTime

Value

The millisecond time value.

Declaration
public long Value { get; }
Property Value
Type Description
System.Int64

Methods

CompareTo(UnixMillisecondTime)

Declaration
public int CompareTo(UnixMillisecondTime other)
Parameters
Type Name Description
UnixMillisecondTime other
Returns
Type Description
System.Int32

Equals(UnixMillisecondTime)

Declaration
public bool Equals(UnixMillisecondTime other)
Parameters
Type Name Description
UnixMillisecondTime other
Returns
Type Description
System.Boolean

Equals(Object)

Declaration
public override bool Equals(object other)
Parameters
Type Name Description
System.Object other
Returns
Type Description
System.Boolean

FromDateTime(DateTime)

Converts a DateTime to UnixMillisecondTime.

Declaration
public static UnixMillisecondTime FromDateTime(DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

a DateTime

Returns
Type Description
UnixMillisecondTime

a UnixMillisecondTime

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

OfMillis(Int64)

Creates a UnixMillisecondTime value.

Declaration
public static UnixMillisecondTime OfMillis(long millis)
Parameters
Type Name Description
System.Int64 millis

the millisecond time value

Returns
Type Description
UnixMillisecondTime

a UnixMillisecondTime

PlusMillis(Int64)

Computes a new time based on a offset in milliseconds from this one.

Declaration
public UnixMillisecondTime PlusMillis(long millis)
Parameters
Type Name Description
System.Int64 millis

a positive or negative number of milliseconds

Returns
Type Description
UnixMillisecondTime

a new UnixMillisecondTime

Operators

Equality(UnixMillisecondTime, UnixMillisecondTime)

Declaration
public static bool operator ==(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Type Name Description
UnixMillisecondTime a
UnixMillisecondTime b
Returns
Type Description
System.Boolean

GreaterThan(UnixMillisecondTime, UnixMillisecondTime)

Declaration
public static bool operator>(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Type Name Description
UnixMillisecondTime a
UnixMillisecondTime b
Returns
Type Description
System.Boolean

GreaterThanOrEqual(UnixMillisecondTime, UnixMillisecondTime)

Declaration
public static bool operator >=(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Type Name Description
UnixMillisecondTime a
UnixMillisecondTime b
Returns
Type Description
System.Boolean

Inequality(UnixMillisecondTime, UnixMillisecondTime)

Declaration
public static bool operator !=(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Type Name Description
UnixMillisecondTime a
UnixMillisecondTime b
Returns
Type Description
System.Boolean

LessThan(UnixMillisecondTime, UnixMillisecondTime)

Declaration
public static bool operator <(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Type Name Description
UnixMillisecondTime a
UnixMillisecondTime b
Returns
Type Description
System.Boolean

LessThanOrEqual(UnixMillisecondTime, UnixMillisecondTime)

Declaration
public static bool operator <=(UnixMillisecondTime a, UnixMillisecondTime b)
Parameters
Type Name Description
UnixMillisecondTime a
UnixMillisecondTime b
Returns
Type Description
System.Boolean

Implements

System.IEquatable<>
System.IComparable<>
IJsonSerializable
In This Article
Back to top Generated by DocFX