docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct TimedScope

    Allows time measurements

    Implements
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEditor.Rendering
    Assembly: Unity.RenderPipelines.Core.Editor.dll
    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

    Implements

    IDisposable

    Extension Methods

    ReflectionUtils.GetField(object, string)
    ReflectionUtils.GetFields(object)
    ReflectionUtils.Invoke(object, string, params object[])
    ReflectionUtils.SetField(object, string, object)
    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, T)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)