Struct TimedScope
Allows time measurements
Inherited Members
Namespace: UnityEditor.Rendering
Syntax
public struct TimedScope : IDisposable
Examples
double duration = 0; using (TimedScope.FromPtr(&duration)) { // something to get the time } Debug.Log($"Duration: {duration}")
Methods
FromPtr(Double*)
Obtains a TimedScope.
Safety: durationMsPtr
must be a non-null pointer to a valid memory location for a double.
Declaration
public static TimedScope FromPtr(double *durationMsPtr)
Parameters
Type | Name | Description |
---|---|---|
Double* | durationMsPtr | The location to write the duration in milliseconds to. |
Returns
Type | Description |
---|---|
TimedScope |
FromRef(ref Double)
Obtains a TimedScope
Declaration
public static TimedScope FromRef(ref double durationMs)
Parameters
Type | Name | Description |
---|---|---|
Double | durationMs | The location to write the duration in milliseconds to. |
Returns
Type | Description |
---|---|
TimedScope |
Explicit Interface Implementations
IDisposable.Dispose()
Dispose method to retrieve the time
Declaration
void IDisposable.Dispose()