Time & Timers
Lens time, frame delta, and timeouts.
Commonly used
getTimeReturns the time in seconds since the lens was started.getDeltaTimeReturns the time difference in seconds between the current frame and previous frame.setTimeoutSets a timeout to call the provided callback after the specified number of milliseconds.clearTimeoutClears the timeout with the specified TimeoutID.
All APIs in this topic
Objects and data
| API | Description |
|---|---|
| clearTimeout | Clears the timeout with the specified TimeoutID. |
| getAbsoluteStartTime | The start time of the Lens since UNIX Epoch in seconds. |
| getDeltaTime | Returns the time difference in seconds between the current frame and previous frame. |
| getRealTimeNanos | Get current time in nanoseconds. |
| getTime | Returns the time in seconds since the lens was started. |
| setTimeout | Sets a timeout to call the provided callback after the specified number of milliseconds. |