Michael just a quick comment:

> On IE, setInterval(0) does not work, so the page skips that test.

What did you see that made it not work?

I just tried it and setInterval(0) worked fine, just like
setTimeout(0) both provided a 15ms resolution.

I did something like this:

var dispatches = [];
function done(disp,n,start)
{
  if (disp) clearInterval(dispatches[n]);
  var diff = getTime()-start;
  var s   = "n: "+n+" diff: "+diff+"<br>";
  // $('#divLog').append(s);
  document.getElementById('divLog').innerHTML += s;
}
function doInterval()  // called by button A click
{
  var t = $('#intervalms').val();
  for (i=0; i < 10; i++) {
    dispatches[i] = setInterval("done(1,"+i+","+getTime()+")",t);
  }
}
function doTimeout() // called by button B click
{
  var t = $('#timeoutms').val();
  for (i=0; i < 10; i++) {
    setTimeout("done(0,"+i+","+getTime()+")",t);
  }
}

--
HLS

Reply via email to