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 |