VulkanShader_1.21.10-0.0.4-alpha.jar

Download file
    package net.vulkanmod.render.profiling;

import net.minecraft.class_310;

public abstract class BuildTimeProfiler {
   private static boolean bench = false;
   private static long startTime;
   private static float deltaTime;

   public static void runBench(boolean building) {
      if (bench) {
         if (startTime == 0L) {
            startTime = System.nanoTime();
         }

         if (!building) {
            deltaTime = (float)(System.nanoTime() - startTime) * 1.0E-6F;
            bench = false;
            startTime = 0L;
         }
      }

   }

   public static void startBench() {
      bench = true;
      class_310.method_1551().field_1769.method_3279();
   }

   public static float getDeltaTime() {
      return deltaTime;
   }
}
    
Download file