Ejemplo n.º 1
0
 static QPCStopWatch()
 {
     QueryPerformanceFrequency(out _frequency);
     StopWatch callibration = new QPCStopWatch();
     long totalOverhead = 0;
     int loopCount = 0;
     for (int i = 0; i < 10; ++i)
     {
         callibration.Start();
         callibration.Stop();
     }
     for (int i = 0; i < 10; ++i)
     {
         callibration.Start();
         callibration.Stop();
         totalOverhead += ((QPCStopWatch)callibration).Ticks;
         loopCount++;
     }
     _overhead = totalOverhead / loopCount;
 }
Ejemplo n.º 2
0
        static QPCStopWatch()
        {
            QueryPerformanceFrequency(out _frequency);
            StopWatch callibration  = new QPCStopWatch();
            long      totalOverhead = 0;
            int       loopCount     = 0;

            for (int i = 0; i < 10; ++i)
            {
                callibration.Start();
                callibration.Stop();
            }
            for (int i = 0; i < 10; ++i)
            {
                callibration.Start();
                callibration.Stop();
                totalOverhead += ((QPCStopWatch)callibration).Ticks;
                loopCount++;
            }
            _overhead = totalOverhead / loopCount;
        }