* Console: Display durations with new formatDuration2()

This commit is contained in:
zzz
2010-11-06 12:28:38 +00:00
parent 1bc563832e
commit 010a1fde3f
17 changed files with 145 additions and 69 deletions

View File

@@ -80,13 +80,13 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
long now = _context.clock().now();
if (_lastUpdated > 0) {
buf.append(Messages.getString("News last updated {0} ago.",
DataHelper.formatDuration(now - _lastUpdated),
DataHelper.formatDuration2(now - _lastUpdated),
_context))
.append('\n');
}
if (_lastFetch > _lastUpdated) {
buf.append(Messages.getString("News last checked {0} ago.",
DataHelper.formatDuration(now - _lastFetch),
DataHelper.formatDuration2(now - _lastFetch),
_context));
}
return buf.toString();
@@ -136,7 +136,7 @@ public class NewsFetcher implements Runnable, EepGet.StatusListener {
return true;
} else {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Last fetched " + DataHelper.formatDuration(_context.clock().now() - _lastFetch) + " ago");
_log.debug("Last fetched " + DataHelper.formatDuration2(_context.clock().now() - _lastFetch) + " ago");
return false;
}
} catch (NumberFormatException nfe) {