Is calling setTimeout with a negative delay ok?
<p>I have a code snippet that I want to last at least a second. So I do:</p>

<pre><code>var currentTimeMillis = new Date().getTime();
// do stuff
var sleepTime = 1000 - (new Date().getTime() - currentTimeMillis);
</code></pre>

<p>Notice that sleepTime can be negative. Can I do</p>

<pre><code>setTimeout(callback, sleepTime)
</code></pre>

<p>Or must I check for a negative value explicitly?</p>
