import{_ as t,a as r,b as a,ag as i}from"./chunks/framework.BcrMLAmg.js";const u=JSON.parse('{"title":"Timer","description":"","frontmatter":{},"headers":[],"relativePath":"references/elements/Timer.md","filePath":"references/elements/Timer.md","lastUpdated":1757844696000}'),s={name:"references/elements/Timer.md"};function d(n,e,o,l,h,m){return a(),r("div",null,e[0]||(e[0]=[i('
The Timer is a non-visual element that can be used to perform actions at specific intervals.
Extends: BaseElement
| Property | Type | Default | Description |
|---|---|---|---|
| interval | number | 1 | The interval in seconds at which the timer will trigger its action. |
| action | function | function | The action to be performed when the timer triggers. |
| running | boolean | false | Indicates whether the timer is currently running or not. |
| amount | number | -1 | The amount of time the timer should run. |
| Method | Returns | Description |
|---|---|---|
| Timer:start | Timer | Starts the timer |
| Timer:stop | Timer | Stops the timer |
Starts the timer with the specified interval.
self Timer The Timer instance to startTimer self The Timer instanceStops the timer if it is currently running.
self Timer The Timer instance to stopTimer self The Timer instance