1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/common/utils/delay.ts
Sebastian Malton a61425124f
Add auto-update notifications and confirmation (#1941)
* add auto-update notifications and confirmation

* Show single update notification (#1985)

* Moving notification icons to top (#1987)

* Switch to EventEmitter (producer&consumer) model

* Add `onCorrect` and `onceCorrect` to ipc module for typechecking ipc  messages

* move type enforced ipc methods to seperate file, add unit tests

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-02-09 10:47:24 -05:00

9 lines
275 B
TypeScript

/**
* Return a promise that will be resolved after at least `timeout` ms have
* passed
* @param timeout The number of milliseconds before resolving
*/
export function delay(timeout = 1000): Promise<void> {
return new Promise(resolve => setTimeout(resolve, timeout));
}