]> git.wh0rd.org - tt-rss.git/commitdiff
fix divide by zero in feeds/minute reporting (closes #668)
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 5 Apr 2013 14:42:59 +0000 (18:42 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 5 Apr 2013 14:42:59 +0000 (18:42 +0400)
update_daemon2.php

index 37d6b40747adfc298c2dea96ab9162a7cc450d5b..c6e215a29e20aa7708e6d30e1819f510ac5a8e88 100755 (executable)
                                        _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);