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
14
14
// So we make sure there's 15 or less (currently, 13 values)
15
15
public AverageTimingsChart () {
16
16
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
+ }
18
24
19
25
// 10ms diffs
20
26
if (averageMsTiming <= 10 ) {
You can’t perform that action at this time.
0 commit comments