Skip to content

Commit 6d317fd

Browse files
committed
Small tweak to warning display and make config variable 'economy-lag-warning' set in ms not ns.
1 parent 8ebe55a commit 6d317fd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Essentials/src/com/earth2me/essentials/Settings.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,9 @@ public int getMailsPerMinute()
10811081

10821082
private long _getEconomyLagWarning()
10831083
{
1084-
return config.getLong("economy-lag-warning", 20000000L); // Default to 20ms
1084+
// Default to 20ms
1085+
final long value = (long)(config.getDouble("economy-lag-warning", 20.0) * 1000000);
1086+
return value;
10851087
}
10861088

10871089
@Override

Essentials/src/com/earth2me/essentials/User.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ public BigDecimal getMoney()
399399
final long elapsed = System.nanoTime() - start;
400400
if (elapsed > ess.getSettings().getEconomyLagWarning())
401401
{
402-
ess.getLogger().log(Level.INFO, "Lag Notice - Slow Economy Response - Request took over {0}ms!", elapsed / 1000000);
402+
ess.getLogger().log(Level.INFO, "Lag Notice - Slow Economy Response - Request took over {0}ms!", elapsed / 1000000.0);
403403
}
404404
return value;
405405
}

0 commit comments

Comments
 (0)