public void StopCycle() { if (state != ExecutionTimeProfilerState.ExpectingStop) throw new PerformanceProfilerException("Profiler should expect stop"); cycleStopTicks = DateTime.Now.Ticks; calculateDataForCycle(); checkForPeriodEnd(); state = ExecutionTimeProfilerState.ExpectingStart; }
public void StartCycle() { if (state != ExecutionTimeProfilerState.ExpectingStart) throw new PerformanceProfilerException("Profiler should expect start"); cycleStartTicks = DateTime.Now.Ticks; state = ExecutionTimeProfilerState.ExpectingStop; }