I have ampscript value which defines how many milliseconds the function should delay the process but can I pass that 'ms' value from ampscript to sleep(?). Below is my script
%%[
var @ms
set @ms="6000"
]%%
<script runat=server>
function sleep(milliseconds) {
var start = new Date().getTime();
for (var i = 0; i < 1e7; i++) {
if ((new Date().getTime() - start) > milliseconds){
break;
}
}
}
sleep(6000);