TickTimeStat .java

net.minecraft.util.profiling.jfr.stats.TickTimeStat (record): members: timestamp, currentAverage. strings: "averageTickDuration". imports: RecordedEvent.

net.minecraft.util.profiling.jfr.statsrecord12 linescommon373 B

API Surface (2)

record TickTimeStat(Instant timestamp, Duration currentAverage)
TickTimeStat from(final RecordedEvent event)

String literals (1)

"averageTickDuration"

Full Source

TickTimeStat.java12 lines · Minecraft 26.3 · verbatim
1
package net.minecraft.util.profiling.jfr.stats;
2
3
import java.time.Duration;
4
import java.time.Instant;
5
import jdk.jfr.consumer.RecordedEvent;
6
7
public record TickTimeStat(Instant timestamp, Duration currentAverage) {
8
	public static TickTimeStat from(final RecordedEvent event) {
9
		return new TickTimeStat(event.getStartTime(), event.getDuration("averageTickDuration"));
10
	}
11
}
12

Decompiled Minecraft 26.3 source of TickTimeStat (net/minecraft/util/profiling/jfr/stats/TickTimeStat.java) with Mojang official mappings, stored verbatim on the site.