Beispiel #1
0
    public static void Update()
    {
        if (!FPSStatistic.sampleFps)
        {
            return;
        }
        double num = (double)Time.realtimeSinceStartup;

        if (FPSStatistic.profiler_lastTime < 0.0)
        {
            FPSStatistic.profiler_lastTime = num;
        }
        else
        {
            FPSStatistic.profiler_fps      = 1f / (float)(num - FPSStatistic.profiler_lastTime);
            FPSStatistic.profiler_lastTime = num;
        }
        FPSStatistic.AddSample(FPSStatistic.profiler_fps);
    }
Beispiel #2
0
 public static void Start()
 {
     FPSStatistic.Reset();
     FPSStatistic.sampleFps = true;
 }