mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-17 20:11:21 +02:00
Small tweak to warning display and make config variable 'economy-lag-warning' set in ms not ns.
This commit is contained in:
@@ -1081,7 +1081,9 @@ public class Settings implements ISettings
|
||||
|
||||
private long _getEconomyLagWarning()
|
||||
{
|
||||
return config.getLong("economy-lag-warning", 20000000L); // Default to 20ms
|
||||
// Default to 20ms
|
||||
final long value = (long)(config.getDouble("economy-lag-warning", 20.0) * 1000000);
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -399,7 +399,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
|
||||
final long elapsed = System.nanoTime() - start;
|
||||
if (elapsed > ess.getSettings().getEconomyLagWarning())
|
||||
{
|
||||
ess.getLogger().log(Level.INFO, "Lag Notice - Slow Economy Response - Request took over {0}ms!", elapsed / 1000000);
|
||||
ess.getLogger().log(Level.INFO, "Lag Notice - Slow Economy Response - Request took over {0}ms!", elapsed / 1000000.0);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user