Please see the following JavaScript code:
var cis_current_time = 0;
setInterval(function() {
cis_current_time += 1;
},1);
$("#timingInfo").html(cis_current_time);
setTimeout(function() {
$("#timingInfo").html($("#timingInfo").html() + ', ' + cis_current_time);
},1000);
As a result I except to get 0, 1000, but it returns 0, number near 200
Please check a fiddle.
What is the reason of such behavior?