# DataType:timer

A timer data type is set in tenths of one second and counts down to zero; starting immediately after being set.

## Members

| **Type**                                                                                   | **Member**        | **Description**             |
| ------------------------------------------------------------------------------------------ | ----------------- | --------------------------- |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md)           | **OriginalValue** | Original value of the timer |
| [*int*](/macroquest/data-types-and-top-level-objects/data-types/datatype-int.md)           | **Value**         | Current value of the timer  |
| [*string*](/macroquest/data-types-and-top-level-objects/data-types/datatype-string.md)\_\_ | **To String**     | Same as **Value**           |

## Example

Consider the following timer:

`/declare BuffTimer timer local`\
`/varset BuffTimer 360`

BuffTimer will be equal to 0 in:

* 360 tenths of 1 second
* 36 seconds
* 6 ticks (a tick is 6 seconds)

Timers may also be set with an "s" (seconds) or an "m" (minutes) appended to the value. For example:

`/varset BuffTimer 360s`

This would set the timer to 3600 (360\*10) tenths of 1 second

`/varset BuffTimer 360m`

This would set the timer to 216000 (360\*60\*10) tenths of 1 second

```
sub main
    /declare myTimer timer local 100
    /while ( ${myTimer} ) {
        /echo ${myTimer}
        /delay 10
    }
/return
```

This would loop while myTimer is above 0


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://macroquest.gitbook.io/macroquest/data-types-and-top-level-objects/data-types/datatype-timer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
