Bug 289275 - Don't correct eventsPerStep if the time taken was 0, because we end up at Infinity!
r=silver a=asa p=gijskruitbosch@gmail.com (Gijs "Hannibal" Kruitbosch) git-svn-id: svn://10.0.0.236/trunk@172555 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
e990f19944
commit
290440468c
@ -313,8 +313,9 @@ function ep_stepevents()
|
||||
en = new Date();
|
||||
|
||||
// i == number of items handled this time.
|
||||
// We only want to do this if we handled at least 25% of our step-limit.
|
||||
if (i * 4 >= this.eventsPerStep)
|
||||
// We only want to do this if we handled at least 25% of our step-limit
|
||||
// and if we have a sane interval between st and en (not zero).
|
||||
if ((i * 4 >= this.eventsPerStep) && (en - st > 0))
|
||||
{
|
||||
// Calculate the number of events that can be processed in 400ms.
|
||||
var newVal = (400 * i) / (en - st);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user