El código es el siguiente: function sleep (n) { var a = new ActiveXObject ("wscript.shell"); A.RUN ("% Compec% /c ping -n" + n + "127.0.0.1> nul", 0, 1); a = nulo; }