# Pause for 5 sec

**URL:** <https://forum.kirupa.com/t/pause-for-5-sec/160455>\
**Category:** Uncategorized\
**Created:** [August 26, 2005, 2:03am UTC](https://forum.kirupa.com/t/pause-for-5-sec/160455 "2005-08-26T02:03:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![james182](https://avatars.discourse-cdn.com/v4/letter/j/278dde/32.png) [@james182](https://forum.kirupa.com/u/james182)\
**Post date:** [August 26, 2005, 2:03am UTC](https://forum.kirupa.com/t/pause-for-5-sec/160455/1 "2005-08-26T02:03:51Z")

</div>

hi i need the timeline to play but pause for 5sec along the way.

what would be the code for that.??  
my code but wont work…

```auto

// sec = number of seconds
 
function paused(sec) {
   stop(); // action to pause
   var i = sec - 1;
   var t = setInterval(function () {
	  if (i == 0) {
		 clearInterval(t);
		 play(); // action to continue
	  }
	  i--;
   }, 1000);
}

```
