> For the complete documentation index, see [llms.txt](https://novoline.gitbook.io/novoscript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://novoline.gitbook.io/novoscript/api/utilities/timer-utility.md).

# Timer Utility

A kind of a "stopwatch"

## timer\_util.getTimer()

Returns a Timer Object with methods

| Name  | Parameters | Type    | Description                                                                              |
| ----- | ---------- | ------- | ---------------------------------------------------------------------------------------- |
| delay | Long       | boolean | Returns true if the amount of milliseconds you specified has passed since the last reset |
| reset | None       | void    | Resets the timer                                                                         |

```javascript
// will print "foo" every second (1000 ms)
var timer = timer_util.getTimer();
if(timer.delay(1000){
    print("foo")
    timer.reset();
}
```
