mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Added 'Sleep' operation.
This commit is contained in:
parent
231322eddf
commit
f528930ad2
5 changed files with 38 additions and 2 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue