public class FrameTimer : MonoBehaviour
A script which monitors the current frame time. You can query this classes FrameTimeInMilliseconds property to get a value which indicates how much time has elapsed in the Current frame. This can be useful for running heavy operations only when the frame time is under a certain threshold.
| Name | Type | Description |
|---|---|---|
| FrameTimeInMilliseconds | long |
The amount of time, in milliseconds, that the current frame has taken. Since this is a long, it's not accurate as using CalculateExactFrameTimeInMilliseconds, but it is more performant. |
public double CalculateExactFrameTimeInMilliseconds()
Calculates an exact frame time in milliseconds. Uses a double for more accurate reporting.
double
The frame time in milliseconds.