PDA

View Full Version : timer not working in ie



smkkiran
9 Feb 2012, 9:50 AM
this.task = { run: additemsToTable,
interval: 10//10 ms
}
var runner = new Ext.util.TaskRunner();
runner.start(this.task);

in above code i want to fire a function at regular interval (10ms) it is working in all other browsers other than ie
In other browsers its firing the function as interval mentioned but in IE its taking too much time to fire that function. Even though its calling the function repeatedly but not in the interval i mentioned... total operations in other browsers raking less than 5 sec but in IE its more than a minute to complete this timer
can anyone help me on this... thanks in advance

mitchellsimoens
9 Feb 2012, 1:17 PM
Have you tried using a plain setInterval? IE isn't that precise in the timing

smkkiran
9 Feb 2012, 9:41 PM
var duration = 1000; var tmFunc = function(){ additemsToTable(); };
setTimeout(tmFunc, duration);
i tried like this but this is also not working....

mitchellsimoens
10 Feb 2012, 4:00 AM
The tmFunc never fires?

smkkiran
10 Feb 2012, 5:49 AM
it is firing the function but not according to the interval i set for it(10 ms or 100ms) its taking different time....
FYI.....i am adding charts into a table in the function