public static MicroStopwatch StartNewMicroStopwatch() { MicroStopwatch timer = new MicroStopwatch(); timer.Start(); return(timer); }
public double FullCalcTimer() { MicroStopwatch timer = MicroStopwatch.StartNewMicroStopwatch(); _application.CalculateFull(); return((double)timer.ElapsedMillisecondsHighResolution); }
public double SheetTimer(Worksheet sheet) { MicroStopwatch timer = MicroStopwatch.StartNewMicroStopwatch(); sheet.Calculate(); return((double)timer.ElapsedMillisecondsHighResolution); }
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); }