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