var start = new Date().getTime();
var cur = start
while(cur - start < msecs)
cur = new Date().getTime();
In Client side this can be called as wait(5000) will make the process wait for 5 seconds.
Note: you cannot execute anyother process at this time.