Added 'Sleep' operation.

This commit is contained in:
n1474335 2018-01-25 13:44:39 +00:00
parent 231322eddf
commit f528930ad2
5 changed files with 38 additions and 2 deletions

View file

@ -189,6 +189,20 @@ const DateTime = {
},
/**
* Sleep operation.
*
* @param {ArrayBuffer} input
* @param {Object[]} args
* @returns {ArrayBuffer}
*/
runSleep: async function(input, args) {
const ms = args[0];
await new Promise(r => setTimeout(r, ms));
return input;
},
/**
* @constant
*/