Exemplo n.º 1
0
 private void LateUpdate()
 {
     for (int i = 0; i < 9; i++)
     {
         CpuStatisticInfo cpuStatisticInfo = CpuStatistic.arr[i];
         if (cpuStatisticInfo._totalCpuTime > 0L)
         {
             cpuStatisticInfo.frameCount++;
             cpuStatisticInfo.totalCpuTime    = (int)cpuStatisticInfo._totalCpuTime / 10;
             cpuStatisticInfo.cpuTimePerFrame = (int)cpuStatisticInfo._totalCpuTime / cpuStatisticInfo.frameCount / 10;
         }
         this._arr[i] = CpuStatistic.arr[i];
     }
 }
Exemplo n.º 2
0
    public static void SampleEnd(CpuStatisticType type)
    {
        CpuStatisticInfo cpuStatisticInfo = CpuStatistic.arr[(int)type];

        cpuStatisticInfo._totalCpuTime += DateTime.Now.Ticks - cpuStatisticInfo._sampleBeginTime;
    }