public void StepUpdate() { _updateDuration = 0.0; if (Time.frameCount % (int)DebugSystems.avgResetInterval == 0) { ResetUpdateDurations(); } for (int index = 0; index < _updateSystems.Count; ++index) { SystemInfo updateSystemInfo = _updateSystemInfos[index]; if (updateSystemInfo.isActive) { _stopwatch.Reset(); _stopwatch.Start(); _updateSystems[index].Update(); _stopwatch.Stop(); double totalMilliseconds = _stopwatch.Elapsed.TotalMilliseconds; _updateDuration += totalMilliseconds; updateSystemInfo.AddUpdateDuration(totalMilliseconds); } } }