Prevent a divide by zero that we're seeing occasionally on startup.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5567 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Mike Thomas
2008-11-21 00:22:51 +00:00
parent e649880f90
commit a5b8aad082
@@ -63,7 +63,8 @@ public class PresentsInvoker extends Invoker
synchronized (this) {
buf.append("- Max queue size: ").append(_maxQueueSize).append("\n");
buf.append("- Units executed: ").append(_unitsRun);
buf.append(" (").append(1000*_unitsRun/sinceLast).append("/s)\n");
long runPerSec = (sinceLast == 0) ? 0 : 1000*_unitsRun/sinceLast;
buf.append(" (").append(runPerSec).append("/s)\n");
if (_currentUnit != null) {
String uname = StringUtil.safeToString(_currentUnit);
buf.append("- Current unit: ").append(uname).append(" ");