Data structure passed to onComplete callbacks when a timer completes.
createTimer(1.5, { onComplete: (data) => { console.log(`Timer on entity ${data.entityId} finished after ${data.elapsed}s`); }}); Copy
createTimer(1.5, { onComplete: (data) => { console.log(`Timer on entity ${data.entityId} finished after ${data.elapsed}s`); }});
The timer's configured duration in seconds
The actual elapsed time (may exceed duration slightly)
The entity ID that the timer belongs to
Data structure passed to onComplete callbacks when a timer completes.
Example