private void Add(ref long currentDurationMs, long elapsedTimeMs) { if (currentDurationMs == -2) { currentDurationMs = 0L; } currentDurationMs += ExecutionLogContext.TimerMeasurementAdjusted(elapsedTimeMs); }
public void Subtract(TimeMetric other) { this.m_totalDurationMs = ExecutionLogContext.TimerMeasurementAdjusted(this.m_totalDurationMs - other.m_totalDurationMs); for (int i = 0; i < this.m_otherMetricAdjustments.Length; i++) { long durationMs = this.m_otherMetricAdjustments[i] - other.m_otherMetricAdjustments[i]; this.m_otherMetricAdjustments[i] = ExecutionLogContext.TimerMeasurementAdjusted(durationMs); } }
public void AddTime(long durationMs) { durationMs = ExecutionLogContext.TimerMeasurementAdjusted(durationMs); this.m_metricAdjuster.UpdateTimeMetricAdjustments(durationMs, this.m_otherMetricAdjustments); this.m_totalDurationMs += durationMs; }