docs.unity.cn
    Show / Hide Table of Contents

    Struct TimedScope

    Allows time measurements

    Inherited Members
    ValueType.Equals(Object)
    ValueType.GetHashCode()
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    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

    A 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

    A TimedScope

    Explicit Interface Implementations

    IDisposable.Dispose()

    Dispose method to retrieve the time

    Declaration
    void IDisposable.Dispose()
    Implements
    IDisposable.Dispose()

    Extension Methods

    AnalyticsUtils.ToNestedColumn<T>(T, Boolean)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, Boolean)
    ReflectionUtils.Invoke(Object, String, Object[])
    ReflectionUtils.SetField(Object, String, Object)
    ReflectionUtils.GetField(Object, String)
    ReflectionUtils.GetFields(Object)
    Back to top Copyright © 2023 Unity Technologies — Terms of use
    Generated by DocFX
    on 08 September 2023