docs.unity.cn
    Show / Hide Table of Contents

    Struct TimedScope

    Allows time measurements

    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

    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 17 July 2023