<script>
function wait(ms){
var start = new Date().getTime();
var end = start;
while(end < start + ms) {
end = new Date().getTime();
}
}
wait(3000);
</script>
<script data-ad-client="ca-pub-123456789789654" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
function wait(ms){
var start = new Date().getTime();
var end = start;
while(end < start + ms) {
end = new Date().getTime();
}
}
console.log('before');
wait(3000); //7 seconds in milliseconds
console.log('after');