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

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