MLTime
NameSpace: MagicLeap
Represents an ML API wide timestamp in nanoseconds that is not guaranteed to be synced with any system time. If OpenXR is used, MLTime is synonymous with the XrTime type. More...
Detailed Description
public class MLTime;
Details*
API for converting between system and runtime clock timestamps.
Public Fields
Value
public long Value { get; set; }
Public Methods
MLResult ConvertMLTimeToSystemTime
Converts timestamps from MLTime to system time. System time is equivalent to the system's monotonic clock. This can be used to calculate duration between two MLTime values by converting them both to a timespec and subtracting the subsequent values.
public static MLResult ConvertMLTimeToSystemTime(
MLTime mlTime,
out long timestampNs
)
Parameters
Type | Name | Description |
---|---|---|
MLTime | mlTime | Represents an ML API wide timestamp in nanoseconds that is not guaranteed to be synced with any system time. If OpenXR is used, MLTime is synonymous with the XrTime type. |
out long | timestampNs |
MLResult ConvertSystemTimeToMLTime
Converts timestamps from system time to MLTime. System time is equivalent to the system's monotonic clock.
public static MLResult ConvertSystemTimeToMLTime(
long timestampNs,
out MLTime mlTime
)
Parameters
Type | Name | Description |
---|---|---|
long | timestampNs | |
out MLTime | mlTime | Represents an ML API wide timestamp in nanoseconds that is not guaranteed to be synced with any system time. If OpenXR is used, MLTime is synonymous with the XrTime type. |
override string ToString
public override string ToString()
implicit operator MLTime
public static implicit operator MLTime(
long timestamp
)
Parameters
Type | Name | Description |
---|---|---|
long | timestamp |
implicit operator long
public static implicit operator long(
MLTime mltime
)
Parameters
Type | Name | Description |
---|---|---|
MLTime | mltime | Represents an ML API wide timestamp in nanoseconds that is not guaranteed to be synced with any system time. If OpenXR is used, MLTime is synonymous with the XrTime type. |