Aspectacular.StopwatchAspect.RecordStepTime C# (CSharp) Method

RecordStepTime() protected method

Records elapsed time for a given step.
protected RecordStepTime ( string stepName, bool forceDetail = false ) : void
stepName string
forceDetail bool Pass true to record data for the step even if this.Detail=false.
return void
        protected void RecordStepTime(string stepName, bool forceDetail = false)
        {
            if (!this.stopwatch.IsRunning)
            {
                this.RecordStartTime();
            }
            else if (this.Detailed || forceDetail)
            {
                this.LogInformationData("Elapsed time since start till " + stepName, this.stopwatch.Elapsed);
                this.LogInformationData("Elapsed ticks since start till " + stepName, stopwatch.ElapsedTicks);
            }
        }