---
description: Built-in Timer library.
---

# Timer

#### Example:

```squirrel
function ExampleTimer()
{
    // This will get called each 5 second.
    return true; // If you return false it will not get called next time.
}

Timer.Add(ExampleTimer, 5.0);
```

### Properties:

<table><thead><tr><th>Name</th><th width="196.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>remaining</td><td>float (Read Only)</td><td>Time remaining before next call</td></tr></tbody></table>

### Static Functions:

#### .Add

`Timer.Add(callback: function, delay: float)`: Timer

| Argument | Type     | Description                   |
| -------- | -------- | ----------------------------- |
| callback | function | Callback that will get called |
| delay    | float    | Delay in seconds              |

Creates a new Timer object.

### Functions:

#### .Destroy

`Timer_Object.Destroy()`

Destroys a Timer object.
