> For the complete documentation index, see [llms.txt](https://docs.thunkable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thunkable.com/~/changes/wHhkjLVeheBnfbpghRnw/timer.md).

# Timer

## Adding Timers to your app

### Create a Timer

You can add a Timer to your app from the Blocks tab of your Thunkable project.\
Find the **Timers** drawer of blocks and click on the ⊕ icon to add a Timer to your app.

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MMGsCOQmypJUYH0PDNJ%2F-MMGuu2irLbUHCPC240O%2Ftimers.png?alt=media\&token=5651bf1b-65c1-4fa4-b09f-6a9b598a8244)

### Properties

| Property | Description                                                                                                                                           | Data Type  |
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- |
| Interval | How regularly the Timer fires, in seconds or milliseconds                                                                                             | Number     |
| Count Up | Toggle whether the timer [time blocks](#get-time-in-seconds) return the current time as counted up from 0, or counted down from the interval duration | True/False |
| Loop     | Toggle whether the Timer will start again once it has fired                                                                                           | True/False |
| Enabled  | Toggle whether the Timer is active in your app                                                                                                        | True/False |

You can also **Delete** the Timer.

### Edit a Timer

You will see the Timers you have added to your app underneath the Timers section of your blocks. Click the gear icon next to the timer you want to edit.

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MMGsCOQmypJUYH0PDNJ%2F-MMGv4zCzvvI2RLgDMSN%2Ftimers-menu.png?alt=media\&token=5ead98d5-d29d-4e2f-8df8-d8d429f1615b)

## Blocks

### Events

#### When Timer Fires

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MJWWgPcZZc65tAJb8I1%2F-MJWXuWTTmlaF7gFpJkN%2Fwhentimerfires.png?alt=media\&token=5c8dd648-a158-4283-aa69-1f9d1cd9438f)

Set something to happen when the Timer fires.

### Functions

#### Start Timer

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY4-Gx3BWY9BSWsUzhb%2F-MY43RwJkchmGugr63KZ%2Ftimst.png?alt=media\&token=63277dfc-69cc-4845-b86b-b7f5014a7850)

Starts the Timer.

#### Stop Timer

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY4-Gx3BWY9BSWsUzhb%2F-MY43XGibUJ5OIFfOEJw%2Ftimstop.png?alt=media\&token=fbacef3e-fb89-43e3-83cc-d7d54de12deb)

Stops the Timer.

### Property Blocks

#### Get time in seconds

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY43err2AVa2sp-xewX%2F-MY43jwC_eia5lxCHWKf%2Fgets.png?alt=media\&token=8e8963d7-d134-4ab8-93ed-c2b454e5bcf9)

If `Count Up` is `false`, returns remaining time from the Timer's interval in seconds.

If `Count Up` is `true`, returns elapsed time from the Timer's interval in seconds.

#### Get time in milliseconds

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY43err2AVa2sp-xewX%2F-MY43ocpgfnYLfCCYOyO%2Fgetms.png?alt=media\&token=de2078ee-b184-440a-90a7-638bf9d792ef)

If `Count Up` is `false`, returns remaining time from the Timer's interval in milliseconds.

If `Count Up` is `true`, returns elapsed time from the Timer's interval in milliseconds.

#### Set Interval

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY43err2AVa2sp-xewX%2F-MY43ydfIG3CSj7lRik4%2Fsetint.png?alt=media\&token=99c19bd9-add5-42f5-bd36-1bef767a9728)

Set interval of Timer in milliseconds.

#### Get Interval of Timer

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY43err2AVa2sp-xewX%2F-MY4438Wtt804U68oYSx%2Fgetint.png?alt=media\&token=e9b2d70c-caaa-4f4e-9baa-392ffb89dbfc)

Returns interval of Timer in milliseconds

#### Set Count Up

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY43err2AVa2sp-xewX%2F-MY448qTmgO6zepg_4M8%2Fsetcount.png?alt=media\&token=e4fa8eec-6d04-4880-928e-35533004e283)

Set whether Count Up is enabled for this Timer.

#### Get Count Up

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY43err2AVa2sp-xewX%2F-MY44DnV5tRBKRUDq1rd%2Fgetcount.png?alt=media\&token=69bec6dd-4fb3-4092-afc7-489f782d5e59)

Returns `true` or `false` value for whether Count Up is enabled for this Timer.

#### Set Loops

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY43err2AVa2sp-xewX%2F-MY44Iy7A0Y6Qu9-wePN%2Fsetloops.png?alt=media\&token=95e2e6c1-4575-4692-af67-bb2d2367b866)

\
If `Loops = true`, the timer will reset itself after it fires. If your interval is 10 seconds, the Timer will fire every 10 seconds.‌

If `Loops = false`, the timer will finish its current interval if it is in the middle of one, and will no longer fire. If your interval is 10s, the timer will finish its current 10 second interval, fire, and then stop.

#### Get Loops

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY43err2AVa2sp-xewX%2F-MY44OMtq-ROtnppYkIi%2Fgetloops.png?alt=media\&token=15cda444-1c4b-4407-962c-2b6142ab4a7d)

Returns `true` or `false` value for whether Loops is enabled for this Timer.

#### Set Enabled

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY43err2AVa2sp-xewX%2F-MY44Uj-q5iFOtdww4s0%2Fsetenabled.png?alt=media\&token=584afc89-4266-496e-8504-f0dfd09efe39)

Set whether the Timer is enabled.

#### Get Enabled

![](https://1223006790-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LAn5scXl2uqUJUOqkJo%2F-MY43err2AVa2sp-xewX%2F-MY44cDFzmYJvAMZpwp9%2FScreen%20Shot%202021-04-12%20at%208.52.24%20AM.png?alt=media\&token=0733368c-db30-4c08-9c3b-eaa4ca8e1473)

Returns `true` or `false` value for whether this Timer is enabled.
