fix divide by zero in feeds/minute reporting (closes #668)

This commit is contained in:
Andrew Dolgov 2013-04-05 18:42:59 +04:00
parent e5fac677c5
commit a26f0c1759
1 changed files with 5 additions and 1 deletions

View File

@ -284,7 +284,11 @@
_debug("Elapsed time: " . (time() - $start_timestamp) . " second(s)");
if ($nf > 0) {
_debug("Feeds processed: $nf; feeds/minute: " . sprintf("%.2d", $nf/((time()-$start_timestamp)/60)));
_debug("Feeds processed: $nf");
if (time() - $start_timestamp > 0) {
_debug("Feeds/minute: " . sprintf("%.2d", $nf/((time()-$start_timestamp)/60)));
}
}
db_close($link);