示例#1
0
        private static ulong GetCyclesPerSeond()
        {
            Rdtsc.Init();

            var sw      = Stopwatch.StartNew();
            var startms = Rdtsc.TimestampP();

            do
            {
            } while (sw.ElapsedMilliseconds < 1000);
            var endms           = Rdtsc.TimestampP();
            var cyclesPerSecond = (endms - startms);

            return(cyclesPerSecond);
        }