Esempio n. 1
0
 public void Start()
 {
     if (sw.IsRunning)
     {
         return;
     }
     startCPU = NativeMethods.GetProcessTime();
     sw.Start();
 }
Esempio n. 2
0
 public void Stop()
 {
     if (!sw.IsRunning)
     {
         return;
     }
     sw.Stop();
     totalCPU   += NativeMethods.GetProcessTime() - startCPU;
     totalTicks += sw.ElapsedTicks;
 }