> For the complete documentation index, see [llms.txt](https://docs.zep.us/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zep.us/zep-script/zep-script-guide/explore-zep-script/zep-script-example-code/timer.md).

# Timer

**Example (Timer) -**

```jsx
let _timer = 90;
let _stateTimer = 0;

App.onUpdate.Add(function(dt){
	_stateTimer += dt;
	
	if(_stateTimer >= 1){
		_stateTimer = 0;
		_timer -= 1;
	}

	
	if(_timer <= 0){
			// time over then...
	}
})
```
