Skip to content

Commit e8d7fa4

Browse files
committed
Reduce ZoneRenderer threshold to a single microsecond, and report in microseconds
1 parent b7cf2af commit e8d7fa4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/main/java/net/rptools/maptool/client/ui/zone/renderer/ZoneRenderer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import java.text.NumberFormat;
3232
import java.util.*;
3333
import java.util.List;
34+
import java.util.concurrent.TimeUnit;
3435
import java.util.stream.Collectors;
3536
import javax.annotation.Nonnull;
3637
import javax.annotation.Nullable;
@@ -704,7 +705,8 @@ public void paintComponent(Graphics g) {
704705
CodeTimer.using(
705706
"ZoneRenderer.renderZone",
706707
timer -> {
707-
timer.setThreshold(10);
708+
timer.setThreshold(1, TimeUnit.MICROSECONDS);
709+
timer.setReportingUnit(TimeUnit.MICROSECONDS);
708710

709711
if (!viewModel.isUsingGdxRenderer()) {
710712
timer.start("paintComponent");

0 commit comments

Comments
 (0)