| Index: web/inc/luci-sleep-promise/promise.ts
|
| diff --git a/web/inc/luci-sleep-promise/promise.ts b/web/inc/luci-sleep-promise/promise.ts
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a8221c42ee1f1923cb2c08dcecfd172ad87a8f80
|
| --- /dev/null
|
| +++ b/web/inc/luci-sleep-promise/promise.ts
|
| @@ -0,0 +1,11 @@
|
| +/*
|
| + Copyright 2016 The LUCI Authors. All rights reserved.
|
| + Use of this source code is governed under the Apache License, Version 2.0
|
| + that can be found in the LICENSE file.
|
| +*/
|
| +
|
| +export function sleep(delay: number): Promise<void> {
|
| + return new Promise<void>( (resolve, reject) => {
|
| + window.setTimeout(resolve, delay);
|
| + });
|
| +}
|
|
|