11 lines
		
	
	
	
		
			367 B
		
	
	
	
		
			Java
		
	
	
	
	
	
			
		
		
	
	
			11 lines
		
	
	
	
		
			367 B
		
	
	
	
		
			Java
		
	
	
	
	
	
| package net.minecraft.util.profiling.jfr.stats;
 | |
| 
 | |
| import java.time.Duration;
 | |
| import java.time.Instant;
 | |
| import jdk.jfr.consumer.RecordedEvent;
 | |
| 
 | |
| public record TickTimeStat(Instant timestamp, Duration currentAverage) {
 | |
| 	public static TickTimeStat from(RecordedEvent event) {
 | |
| 		return new TickTimeStat(event.getStartTime(), event.getDuration("averageTickDuration"));
 | |
| 	}
 | |
| }
 |