Table of Contents

Class RealTimeProvider

Namespace
SimulationFramework.Components
Assembly
SimulationFramework.dll

Feeds real time values into a simulation.

public sealed class RealTimeProvider : ITimeProvider, ISimulationComponent, IDisposable
Inheritance
RealTimeProvider
Implements
Inherited Members

Constructors

RealTimeProvider()

public RealTimeProvider()

Properties

MaxDeltaTime

public float MaxDeltaTime { get; set; }

Property Value

float

Scale

public float Scale { get; set; }

Property Value

float

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

GetDeltaTime()

Gets the amount time that has passed since the last frame of the simulation, in seconds.

public float GetDeltaTime()

Returns

float

GetRawDeltaTime()

Gets the unscaled, unclamped amount of time that has passes since the last frame of the simulation, in seconds.

public float GetRawDeltaTime()

Returns

float

GetTotalTime()

Gets the amount time that has passed since the simulation has started, in seconds.

public float GetTotalTime()

Returns

float

Initialize(MessageDispatcher)

Initializes the component. This is called once after the component is added to a simulation.

public void Initialize(MessageDispatcher dispatcher)

Parameters

dispatcher MessageDispatcher

The simulation's MessageDispatcher. This can be used to listen for messages to be called back at a later frame.

IsRunningSlowly()

true if deltaTime had to be clamped to MaxDeltaTime this frame.

public bool IsRunningSlowly()

Returns

bool

SetMaxDeltaTime(float)

public void SetMaxDeltaTime(float maxDeltaTime)

Parameters

maxDeltaTime float