Protogame.MemoryProfiler.EndEvent C# (CSharp) Method

EndEvent() private method

private EndEvent ( string name, string parameters, Stopwatch stopwatch ) : void
name string
parameters string
stopwatch Stopwatch
return void
        internal void EndEvent(string name, string[] parameters, Stopwatch stopwatch)
        {
            if (!_measuredCosts.ContainsKey(name))
            {
                _measuredCosts[name] = 0;
            }

            _measuredCosts[name] += stopwatch.Elapsed.TotalMilliseconds*1000;
        }
    }

Usage Example

Ejemplo n.º 1
0
        public void Dispose()
        {
            _stopwatch.Stop();

            _profiler.EndEvent(_name, _parameters, _stopwatch);
        }