CodeProfilerTests StoppingUpdatesSectionTotalTime Method Delta Engine Documentation

Namespace: DeltaEngine.Profiling.Tests
Assembly: DeltaEngine.Profiling.Tests (in DeltaEngine.Profiling.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void StoppingUpdatesSectionTotalTime()
Examples

[Test]
public void StoppingUpdatesSectionTotalTime()
{
    var profiler = new CodeProfiler();
    profiler.Start(ProfilingMode.Rendering, Section);
    Thread.Sleep(1);
    profiler.Stop(ProfilingMode.Rendering, Section);
    CodeProfilerSection section = profiler.Sections[2][0];
    Assert.AreEqual(1, section.Calls);
    Assert.IsTrue(section.TotalTime > 0.0f);
}
See Also