Framework.SetConstantFrameTime(Boolean,Single) Method (SetConstantFrameTime)

Enables or disables a constant frame time.

Definition

Visual Basic Public Sub SetConstantFrameTime( _
    ByVal constantFrameTime As Boolean, _
    ByVal timePerFrame As Single _
)
C# public void SetConstantFrameTime(
    bool constantFrameTime,
    float timePerFrame
);
C++ public:
void SetConstantFrameTime(
    bool constantFrameTime,
    float timePerFrame
);
JScript public function SetConstantFrameTime(
    constantFrameTime : boolean,
    timePerFrame : float
);

Parameters

constantFrameTime System.Boolean
Set to true to enable a constant frame time; otherwise, false.
timePerFrame System.Single
Time per frame, in seconds.

Remarks

The default rate is one second for every 30 frames, or 0.0333 seconds per frame.

This function is useful for saving the rendered output to a video format for playback, allowing animation at a rate independent of the actual rate at which frames were rendered.