CodeProfilerTests 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]
public void OnlyProfilesOnceIfTooShortATimeHasPassed()
{
    var profiler = new CodeProfiler(1);
    int count = 0;
    profiler.Updated += () => count++;
    RunOneFrameOfProfiling(profiler);
    RunOneFrameOfProfiling(profiler);
    Assert.AreEqual(1, count);
}
See Also