We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4bd4dd4 commit 6a5dabbCopy full SHA for 6a5dabb
src/main/java/dev/walshy/sfmetrics/charts/AverageTimingsChart.java
@@ -14,7 +14,13 @@ public class AverageTimingsChart extends SimplePie implements VersionDependentCh
14
// So we make sure there's 15 or less (currently, 13 values)
15
public AverageTimingsChart() {
16
super("average_timings", () -> {
17
- long averageMsTiming = SlimefunPlugin.getProfiler().getAndResetAverageTimings();
+ 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
+ }
24
25
// 10ms diffs
26
if (averageMsTiming <= 10) {
0 commit comments