Table of Contents

Struct CompressedTimeSpan

Namespace
Stride.Animations
Assembly
Stride.Engine.dll
[DataSerializer(typeof(CompressedTimeSpanSerializer))]
public struct CompressedTimeSpan : IComparable, IComparable<CompressedTimeSpan>, IEquatable<CompressedTimeSpan>
Implements

Constructors

CompressedTimeSpan(int)

public CompressedTimeSpan(int ticks)

Parameters

ticks int

Fields

MaxValue

public static readonly CompressedTimeSpan MaxValue

Field Value

CompressedTimeSpan

MinValue

public static readonly CompressedTimeSpan MinValue

Field Value

CompressedTimeSpan

TicksPerMillisecond

public const int TicksPerMillisecond = 100

Field Value

int

TicksPerSecond

public const int TicksPerSecond = 100000

Field Value

int

Zero

public static readonly CompressedTimeSpan Zero

Field Value

CompressedTimeSpan

Properties

Ticks

public int Ticks { get; }

Property Value

int

Methods

CompareTo(CompressedTimeSpan)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(CompressedTimeSpan other)

Parameters

other CompressedTimeSpan

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

CompareTo(object)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(object obj)

Parameters

obj object

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes obj in the sort order.
Zero This instance occurs in the same position in the sort order as obj.
Greater than zero This instance follows obj in the sort order.

Exceptions

ArgumentException

obj is not the same type as this instance.

Equals(CompressedTimeSpan)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(CompressedTimeSpan other)

Parameters

other CompressedTimeSpan

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

FromSeconds(double)

public static CompressedTimeSpan FromSeconds(double seconds)

Parameters

seconds double

Returns

CompressedTimeSpan

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int

A 32-bit signed integer that is the hash code for this instance.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.

Operators

operator +(CompressedTimeSpan, CompressedTimeSpan)

public static CompressedTimeSpan operator +(CompressedTimeSpan t1, CompressedTimeSpan t2)

Parameters

t1 CompressedTimeSpan
t2 CompressedTimeSpan

Returns

CompressedTimeSpan

operator /(CompressedTimeSpan, int)

public static CompressedTimeSpan operator /(CompressedTimeSpan t1, int factor)

Parameters

t1 CompressedTimeSpan
factor int

Returns

CompressedTimeSpan

operator /(CompressedTimeSpan, float)

public static CompressedTimeSpan operator /(CompressedTimeSpan t1, float factor)

Parameters

t1 CompressedTimeSpan
factor float

Returns

CompressedTimeSpan

operator ==(CompressedTimeSpan, CompressedTimeSpan)

public static bool operator ==(CompressedTimeSpan left, CompressedTimeSpan right)

Parameters

left CompressedTimeSpan
right CompressedTimeSpan

Returns

bool

explicit operator CompressedTimeSpan(TimeSpan)

public static explicit operator CompressedTimeSpan(TimeSpan t)

Parameters

t TimeSpan

Returns

CompressedTimeSpan

operator >(CompressedTimeSpan, CompressedTimeSpan)

public static bool operator >(CompressedTimeSpan t1, CompressedTimeSpan t2)

Parameters

t1 CompressedTimeSpan
t2 CompressedTimeSpan

Returns

bool

operator >=(CompressedTimeSpan, CompressedTimeSpan)

public static bool operator >=(CompressedTimeSpan t1, CompressedTimeSpan t2)

Parameters

t1 CompressedTimeSpan
t2 CompressedTimeSpan

Returns

bool

implicit operator TimeSpan(CompressedTimeSpan)

public static implicit operator TimeSpan(CompressedTimeSpan t)

Parameters

t CompressedTimeSpan

Returns

TimeSpan

operator !=(CompressedTimeSpan, CompressedTimeSpan)

public static bool operator !=(CompressedTimeSpan left, CompressedTimeSpan right)

Parameters

left CompressedTimeSpan
right CompressedTimeSpan

Returns

bool

operator <(CompressedTimeSpan, CompressedTimeSpan)

public static bool operator <(CompressedTimeSpan t1, CompressedTimeSpan t2)

Parameters

t1 CompressedTimeSpan
t2 CompressedTimeSpan

Returns

bool

operator <=(CompressedTimeSpan, CompressedTimeSpan)

public static bool operator <=(CompressedTimeSpan t1, CompressedTimeSpan t2)

Parameters

t1 CompressedTimeSpan
t2 CompressedTimeSpan

Returns

bool

operator *(CompressedTimeSpan, int)

public static CompressedTimeSpan operator *(CompressedTimeSpan t1, int factor)

Parameters

t1 CompressedTimeSpan
factor int

Returns

CompressedTimeSpan

operator *(CompressedTimeSpan, float)

public static CompressedTimeSpan operator *(CompressedTimeSpan t1, float factor)

Parameters

t1 CompressedTimeSpan
factor float

Returns

CompressedTimeSpan

operator -(CompressedTimeSpan, CompressedTimeSpan)

public static CompressedTimeSpan operator -(CompressedTimeSpan t1, CompressedTimeSpan t2)

Parameters

t1 CompressedTimeSpan
t2 CompressedTimeSpan

Returns

CompressedTimeSpan