# Waiter `[Shared]`

The Waiter module provides timing utilities to handle code execution with timeout conditions. It's particularly useful when you need to wait for specific conditions to be met before proceeding with code execution.

## JO Functions

### jo.waiter.exec()

Execute a function repeatedly until a condition is met or a timeout occurs. <br>

#### Syntax

```lua
jo.waiter.exec(condition, executable, loopSpeed, maxDuration)
```

#### Parameters

`condition` : _function_
> The condition to stop the loop
>

`executable` : _function_ `[Optional]`
> Function to execute after each test
>

`loopSpeed` : _integer_ `[Optional]`
> The wait between each test in ms <br> default:0
>

`maxDuration` : _integer_ `[Optional]`
> The max duration to wait in ms <br> default:5000
>

#### Return Value

Type : _boolean_

> True if the condition was met, false if timeout occurred
