SystemProfilerTests ProfilesTwiceIfEnoughTimeHasPassed 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 ProfilesTwiceIfEnoughTimeHasPassed()
Examples

[Test, CloseAfterFirstFrame]
public void ProfilesTwiceIfEnoughTimeHasPassed()
{
    int count = 0;
    var profiler = new SystemProfiler(1000000);
    profiler.Updated += () => count++;
    profiler.Log(ProfilingMode.Fps, systemInformation);
    profiler.Log(ProfilingMode.Fps, systemInformation);
    Assert.AreEqual(2, profiler.GetProfilingResults(ProfilingMode.Fps).Calls);
    Assert.AreEqual(2, count);
}
See Also