Ejemplo n.º 1
0
        public void MeasureMinOverhead_ConstantStep()
        {
            long step  = 17;
            var  timer = new ConstantStepTimer()
            {
                Step = step
            };

            var m = TimerMeasurer.MeasureOverhead(timer);

            Assert.Equal(step, m.Value);
        }
Ejemplo n.º 2
0
        public void MeasurePrecision_ConstantStep()
        {
            long step  = 17;
            var  timer = new ConstantStepTimer()
            {
                Step = step
            };
            var measurements = new Ticks[53];

            TimerMeasurer.MeasurePrecision(timer, new ArraySegment <Ticks>(measurements));

            foreach (var m in measurements)
            {
                Assert.Equal(step, m.Value);
            }
        }