Struct TimeDetails
Time data structure for spatial attachment
Inherited Members
Namespace: Unity.Cloud.Collaboration.Models.Abstractions
Assembly: Unity.Cloud.Collaboration.dll
Syntax
[DataContract(Name = "assets.TimeDetails")]
public struct TimeDetails
Constructors
TimeDetails(float, float)
Initializes a new instance of the TimeDetails struct with the specified time scale and time stamp.
Declaration
public TimeDetails(float timeScale, float timeStamp)
Parameters
| Type | Name | Description |
|---|---|---|
| float | timeScale | Equals 1/timebase where timebase represents a single tick in seconds. |
| float | timeStamp | The time in ticks, based on the time given by 1/timescale. |
Properties
TimeScale
Equals 1/timebase where timebase represents a single tick in seconds
Declaration
[DataMember(Name = "timeScale", EmitDefaultValue = true, IsRequired = true)]
public readonly float TimeScale { get; }
Property Value
| Type | Description |
|---|---|
| float |
TimeStamp
The time in ticks, based on the time given by 1/timescale
Declaration
[DataMember(Name = "timeStamp", EmitDefaultValue = true, IsRequired = true)]
public readonly float TimeStamp { get; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
Equals(object)
Validate obj is a TimeDetails instance and have the same values as this instance.
Declaration
public override bool Equals(object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | Compare the values with this instance. |
Returns
| Type | Description |
|---|---|
| bool | true if both instance have the same values; false otherwise. |
Overrides
Equals(TimeDetails)
Returns whether two TimeDetails objects are equals.
Declaration
public bool Equals(TimeDetails other)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeDetails | other | The other TimeDetails to compare with this instance. |
Returns
| Type | Description |
|---|---|
| bool | true if both instance have the same values; false otherwise. |
GetHashCode()
Compute a hash code for the object.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A hash code for the current object. |
Overrides
Remarks
- You should not assume that equal hash codes imply object equality.
- You should never persist or use a hash code outside the application domain in which it was created, because the same object may hash differently across application domains, processes, and platforms.
Operators
operator ==(TimeDetails, TimeDetails)
Get if two TimeDetails represent the same.
Declaration
public static bool operator ==(TimeDetails left, TimeDetails right)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeDetails | left | Compare with this first instance. |
| TimeDetails | right | Compare with this other instance. |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(TimeDetails, TimeDetails)
Get if two TimeDetails does not represent the same.
Declaration
public static bool operator !=(TimeDetails left, TimeDetails right)
Parameters
| Type | Name | Description |
|---|---|---|
| TimeDetails | left | Compare with this first instance. |
| TimeDetails | right | Compare with this other instance. |
Returns
| Type | Description |
|---|---|
| bool | true if both instances are not the same; false if both instances are the same. |