UNPKG

binaris

Version:

Binaris SDK & CLI

11 lines (9 loc) 239 B
'use strict'; /** * Imitates stdc sleep behavior using es6 async/await * * @param {int} ms - the duration in milliseconds to sleep */ module.exports = function msleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); };