예제 #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;
 }
예제 #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;
        }