Added 'Sleep' operation.

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

No files matched your search

+14
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
*/