Javascript increasing a value and the velocity on increasing it
<p>I need to increase a number and I used <code>setInterval(Function, time)</code>
so I put a variable for time: <code>time = 1000</code> now I need to change it so I put a function that changes it when I click a button:</p>

<pre><code>function changetime() {time = time - 100;}
</code></pre>

<p>but it seems that you can't change the time of <code>setInterval</code> while is working...
how can I do that?
I tried with a <code>setTimeout</code> but the number now changes "jumping". is not regular...
I'm not sure but it seems that the "jump" changes when I change the <code>setTimeout</code> time... like if the timeout is now in the <code>setInterval</code> time.</p>

<p>Original code---_></p>

<pre><code>var time = 1000;
function interval() { setInterval(Function, time);}
function changetime() {setTimeout(interval, 10);tempo = tempo - 200;}
</code></pre>