File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Essentials/src/com/earth2me/essentials Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -187,7 +187,7 @@ public boolean canAfford(final BigDecimal cost)
187187
188188 public boolean canAfford (final BigDecimal cost , final boolean permcheck )
189189 {
190- if (cost .signum () <= 0 )
190+ if (cost .signum () <= 0 )
191191 {
192192 return true ;
193193 }
@@ -393,6 +393,18 @@ public void setLastOnlineActivity(final long timestamp)
393393
394394 @ Override
395395 public BigDecimal getMoney ()
396+ {
397+ final long start = System .nanoTime ();
398+ final BigDecimal value = _getMoney ();
399+ final long elapsed = start - System .nanoTime ();
400+ if (elapsed > 20000000L )
401+ {
402+ ess .getLogger ().log (Level .INFO , "Lag Notice - Slow Economy Response - Request took over {0}ms!" , elapsed / 1000000 );
403+ }
404+ return value ;
405+ }
406+
407+ private BigDecimal _getMoney ()
396408 {
397409 if (ess .getPaymentMethod ().hasMethod ())
398410 {
You can’t perform that action at this time.
0 commit comments