1
0
mirror of https://github.com/trezor/trezor-wallet synced 2024-11-12 11:28:56 +00:00
trezor-wallet/src/utils/promiseUtils.js
2018-08-27 17:15:22 +02:00

12 lines
322 B
JavaScript

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