avoid division by zero when index transfer is extremely fast

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1269 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
hermens 19 years ago
parent 26bab876db
commit 11fe95832e

@ -735,7 +735,9 @@ public final class plasmaWordIndexDistribution {
} }
public int getTransferedEntitySpeed() { public int getTransferedEntitySpeed() {
return (int) ((1000 * transferedEntryCount) / (System.currentTimeMillis()-startingTime)); long transferTime = System.currentTimeMillis() - startingTime;
if (transferTime <= 0) transferTime = 1;
return (int) ((1000 * transferedEntryCount) / transferTime);
} }
public yacySeed getSeed() { public yacySeed getSeed() {
@ -929,4 +931,4 @@ public final class plasmaWordIndexDistribution {
*/ */
} }
} }

Loading…
Cancel
Save