Skip to content

Commit

Permalink
Fix conversions of tick time
Browse files Browse the repository at this point in the history
  • Loading branch information
SquidDev committed May 13, 2022
1 parent 346ea7f commit c6201df
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ public static void export(MetricContext context) {
totalPlayerCount.set(server.getPlayerCount());

// TODO: This doesn't include the time to run Forge/Fabric hooks! Not sure how to handle that in a generic way.
averageTickTime.set(server.getAverageTickTime() * 1e-9);
tickTime.observe(server.tickTimes[server.getTickCount() % 100] * 1e-9);
averageTickTime.set(server.getAverageTickTime() * 1e-3); // ms to s
tickTime.observe(server.tickTimes[server.getTickCount() % 100] * 1e-9); // ns to s.
});
}
}

0 comments on commit c6201df

Please sign in to comment.