---
title: setTimeout
framework: TVMLKit JS
role: symbol
role_heading: Function
platforms: [tvOS 9.0+]
path: tvmljs/1627349-settimeout
---

# setTimeout

Executes a given function after a set amount of time.

## Declaration

```data
String setTimeout(
    in Function func, 
    in Integer time
);
```

## Parameters

- `func`: The function to be executed.
- `time`: An integer value that defines, in milliseconds, how long until the function is executed.

## Return Value

Return Value Returns a string containing an identifier for the timeout just set.

## Discussion

Discussion Pass the identifier created by this function to the clearTimeout function to stop the designated function from executing.

## See Also

### Automating Function Timing

- [setInterval](tvmljs/1627337-setinterval.md)
- [clearInterval](tvmljs/1627411-clearinterval.md)
- [clearTimeout](tvmljs/1627416-cleartimeout.md)
