File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
src/main/java/dev/walshy/sfmetrics/charts Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,13 @@ public class AverageTimingsChart extends SimplePie implements VersionDependentCh
1414 // So we make sure there's 15 or less (currently, 13 values)
1515 public AverageTimingsChart () {
1616 super ("average_timings" , () -> {
17- long averageMsTiming = SlimefunPlugin .getProfiler ().getAndResetAverageTimings ();
17+ long averageMsTiming = 0 ;
18+ try {
19+ averageMsTiming = SlimefunPlugin .getProfiler ().getAndResetAverageTimings ();
20+ } catch (ArithmeticException e ) {
21+ // I forgot we test this on startup when the timing would be 0.
22+ // This is a quick and dirty fix - thank god for easy module stuff
23+ }
1824
1925 // 10ms diffs
2026 if (averageMsTiming <= 10 ) {
You can’t perform that action at this time.
0 commit comments