I think you are confusing a couple things. See the code below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Title</title>
</head>
<body>
<script>
setTimeout(function(){alert("Hello1")}, 9000);
alert("Hello2");
</script>
</body>
</html>
Right after the setTimeout is set to run (
queued) after seconds, the next line of code is to print Hello2 to the screen. Hello2 prints almost instantaneously, because it is the next line of code ( no waiting here). The other thing is to pause a timer you would do something like this:
my_timer = setTimeout(function(){alert("Hello1")}, 9000);
Then later on you would do this:
stop the timer and restart it.
my_timer.pause(); //Makes no sense for setInterval or setTimeout
You can go a search on, "pause javascript timer" also.
See this thread:
http://stackoverflow.com/questions/7279567/how-do-i-pause-a-window-setinterval-in-javascript