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:
@@ -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(" ");
|
||||
|
||||
Reference in New Issue
Block a user