GlobalTime Update Method Delta Engine Documentation

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

public void Update()
Remarks

Tests: DeltaEngine.Tests.Core.GlobalTimeTests
Examples

5 unit tests call DeltaEngine.Core.GlobalTime.Update
[Test]
public void RunTime()
{
    time.Update();
    Assert.LessOrEqual(time.Milliseconds, 50);
}
[Test]
public void RunTimeWithStopwatch()
{
    time = new StopwatchTime();
    time.Update();
    Assert.IsTrue(time.Milliseconds < 2, "Milliseconds=" + time.Milliseconds);
}
[Test]
public void CalculateFps()
{
    do
        time.Update();
    while (time.Milliseconds <= 1000);
    Assert.IsTrue(Math.Abs(time.Fps - 20) <= 1, "Fps=" + time.Fps);
}
See Also