How to make a variable timer sequence which runs infinitive
<p>I have <code>n</code> parameters which have to be run in sequence for <code>t</code> seconds each. All the data is stored in an array which is loaded dynamically through ajax and json and exists of: function parameters <code>p</code> and time to sleep <code>t</code></p>

<p><code>function(p1)</code>, for 30 seconds; when it completes <code>function(p2)</code> for 15 seconds etc etc </p>

<p>Until the array is complete; then we  have to start all over.
The number of parameters and its time being displayed are not determined on forehand. </p>

<p>How can I implement this with javascript?</p>

<p>//edit:
I tried to make one big function with function(p1) starting at t=0; function(p2) starting at t=t1; function(p3) starting at t=t1+t3</p>

<p>But it felt 'stupid' and overdone....</p>
