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
Scale
public float Scale { get; set; }
Property Value
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
GetRawDeltaTime()
Gets the unscaled, unclamped amount of time that has passes since the last frame of the simulation, in seconds.
public float GetRawDeltaTime()
Returns
GetTotalTime()
Gets the amount time that has passed since the simulation has started, in seconds.
public float GetTotalTime()
Returns
Initialize(MessageDispatcher)
Initializes the component. This is called once after the component is added to a simulation.
public void Initialize(MessageDispatcher dispatcher)
Parameters
dispatcher
MessageDispatcherThe 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
SetMaxDeltaTime(float)
public void SetMaxDeltaTime(float maxDeltaTime)
Parameters
maxDeltaTime
float