Why don't you check it out yourself? Documentation is always welcome, however you cannot win in real examples:
var startTime = Date.now(); setTimeout(function () { var endTime = Date.now(); alert("timeOut was: " + (endTime - startTime) + "ms"); });
JSFiddle: http://jsfiddle.net/losnir/PbJBA/
Play with different timeout values.
Do not pass timeout arguments are almost the same as passing 0 . However, as you can see, the timeout is never 0 because your callback function will be queued and executed as soon as possible (based on your requested timeout value).
On average, it is about 5 ms, and if your user interface thread performs some intensive tasks or your processor is busy, it can be as high as a few hundred milliseconds, awful !
source share