1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-15 12:59:09 +00:00
trezor-wallet/src/js/utils/promiseUtils.js
2018-04-16 23:19:50 +02:00

12 lines
342 B
JavaScript

/* @flow */
'use strict';
// import root from 'window-or-global';
// import Promise from 'es6-promise';
export async function resolveAfter<T>(msec: number, value: any = null): Promise<T> {
return await new Promise((resolve) => {
//root.setTimeout(resolve, msec, value);
window.setTimeout(resolve, msec, value);
});
}