Beispiel #1
0
        protected override Size ArrangeOverride(Size finalSize)
        {
            long startTicks = Stopwatch.GetTimestamp();

            Size sz = base.ArrangeOverride(finalSize);

            long endTicks = Stopwatch.GetTimestamp();

            double ticks = (double)(endTicks - startTicks);

            double nanoSecs = PerfStatic.GetNanoSecondsFromTicks(ticks, Stopwatch.Frequency);

            arrangeNanoSecsTotal += nanoSecs;

            arrangeCount++;

            return(sz);
        }
Beispiel #2
0
        protected override Size MeasureOverride(Size availableSize)
        {
            long startTicks = Stopwatch.GetTimestamp();

            Size sz = base.MeasureOverride(availableSize);

            long endTicks = Stopwatch.GetTimestamp();

            double ticks = (double)(endTicks - startTicks);

            double nanoSecs = PerfStatic.GetNanoSecondsFromTicks(ticks, Stopwatch.Frequency);

            measureNanoSecsTotal += nanoSecs;

            measureCount++;

            return(sz);
        }