Struct FrameTime | Profile Analyzer | 0.6.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Struct FrameTime

    Metrics related to an individual frame

    Namespace: UnityEditor.Performance.ProfileAnalyzer
    Syntax
    public struct FrameTime : IComparable<FrameTime>

    Constructors

    FrameTime(Int32, Single, Int32)

    Initialise FrameTime

    Declaration
    public FrameTime(int index, float msTime, int _count)
    Parameters
    Type Name Description
    Int32 index

    The frame index

    Single msTime

    The duration of the frame in milliseconds

    Int32 _count

    The number of occurrences

    FrameTime(FrameTime)

    Initialise from another FrameTime

    Declaration
    public FrameTime(FrameTime t)
    Parameters
    Type Name Description
    FrameTime t

    The FrameTime to assign

    Fields

    count

    Number of occurrences

    Declaration
    public int count
    Field Value
    Type Description
    Int32

    frameIndex

    Index of which frame this time duration occured on. A zero based frame index

    Declaration
    public int frameIndex
    Field Value
    Type Description
    Int32

    ms

    Duration in the frame in milliseconds

    Declaration
    public float ms
    Field Value
    Type Description
    Single

    Methods

    CompareCount(FrameTime, FrameTime)

    Compare the instance count between two FrameTimes and check which is larger

    Declaration
    public static int CompareCount(FrameTime a, FrameTime b)
    Parameters
    Type Name Description
    FrameTime a

    The first FrameTime to compare

    FrameTime b

    The second FrameTime to compare

    Returns
    Type Description
    Int32

    -1 if a is smaller, 0 if the same, 1 if a is larger

    CompareMs(FrameTime, FrameTime)

    Compare the time duration between two FrameTimes and check which is larger

    Declaration
    public static int CompareMs(FrameTime a, FrameTime b)
    Parameters
    Type Name Description
    FrameTime a

    The first FrameTime to compare

    FrameTime b

    The second FrameTime to compare

    Returns
    Type Description
    Int32

    -1 if a is smaller, 0 if the same, 1 if a is larger

    CompareTo(FrameTime)

    Compare the time duration between the frames and check which is larger

    Declaration
    public int CompareTo(FrameTime other)
    Parameters
    Type Name Description
    FrameTime other

    The other FrameTime to compare

    Returns
    Type Description
    Int32

    -1 if this is smaller, 0 if the same, 1 if this is larger

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023