---
name: "BIS_fnc_runLater"
type: function
status: ok
groups: ["Program Flow"]
arma3_since: "1.16"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_runLater
revid: 349313
updated: 2023-11-08T14:52:25Z
---

# BIS_fnc_runLater

*Function · Program Flow · Arma 3 v1.16*

## Description

Stack code/function that should be run later, after some time/frames or/and custom condition. Internally calls [BIS_fnc_loop](../functions/BIS_fnc_loop.md).

## Syntax

```sqf
[id, code, timer, timerType, condition] call BIS_fnc_runLater
```

**Parameters:**

- `id`: [String](../topics/String.md) - unique Id
- `code`: [Code](../topics/Code.md) or [String](../topics/String.md) - code/function that is executed later
- `timer`: [Number](../topics/Number.md) - the timer value (can be in seconds or frames)
- `timerType`: [String](../topics/String.md) - can be "seconds" or "frames"
- `condition`: [Code](../topics/Code.md) - the custom condition, code is only executed if timer is validated and condition is met

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
// Hints current game time in the next frame after 5 seconds have passed
["uniqueId", { hint str time; }, 5] call BIS_fnc_runLater;
```

### Example 2

```sqf
// Hints current game time in the next frame after 120 frames have passed
["uniqueId", { hint str time; }, 120, "frames"] call BIS_fnc_runLater;
```

### Example 3

```sqf
// Hints current game time in the next frame after BIS_variable is assigned
["uniqueId", { hint str time; }, nil, nil, { !isNil { BIS_variable } }] call BIS_fnc_runLater;
```

### Example 4

```sqf
// Hints current game time in the next frame after 5 seconds have passed and BIS_variable is assigned
["uniqueId", { hint str time; }, 5, "seconds", { !isNil { BIS_variable } }] call BIS_fnc_runLater;
```

### Example 5

```sqf
// Hints current game time in the next frame
["uniqueId", { hint str time; }] call BIS_fnc_runLater;
```

## See also

[BIS_fnc_CPWaitUntil](../functions/BIS_fnc_CPWaitUntil.md) · [waitUntil](../commands/waitUntil.md) · [BIS_fnc_loop](../functions/BIS_fnc_loop.md)

<sub>Source: [BI Community Wiki — BIS fnc runLater](https://community.bistudio.com/wiki/BIS_fnc_runLater) (revision 349313).</sub>
