2
0
mirror of https://github.com/gchq/CyberChef synced 2026-01-05 18:13:15 +00:00

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