示例#1
0
        public static MicroStopwatch StartNewMicroStopwatch()
        {
            MicroStopwatch timer = new MicroStopwatch();

            timer.Start();
            return(timer);
        }
示例#2
0
        public double FullCalcTimer()
        {
            MicroStopwatch timer = MicroStopwatch.StartNewMicroStopwatch();

            _application.CalculateFull();
            return((double)timer.ElapsedMillisecondsHighResolution);
        }
示例#3
0
        public double SheetTimer(Worksheet sheet)
        {
            MicroStopwatch timer = MicroStopwatch.StartNewMicroStopwatch();

            sheet.Calculate();
            return((double)timer.ElapsedMillisecondsHighResolution);
        }
示例#4
0
        public double UsedRangeTimer(Worksheet sheet)
        {
            MicroStopwatch timer = MicroStopwatch.StartNewMicroStopwatch();

            if (Convert.ToDouble(_application.Version) >= 12.0)
            {
                sheet.UsedRange.CalculateRowMajorOrder();
            }
            else
            {
                sheet.UsedRange.Calculate();
            }

            return((double)timer.ElapsedMillisecondsHighResolution);
        }