FGameTime

Contains all the timings of a gaming frame, to handle pause and time dilation (for instance bullet time) of the world.

Choose your operating system:

Windows

macOS

Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/World.h

Include

#include "Engine/World.h"

Syntax

struct FGameTime

Remarks

Contains all the timings of a gaming frame, to handle pause and time dilation (for instance bullet time) of the world.

Constructors

Name Description

Public function

FGameTime()

Public function

FGameTime

(
    const FGameTime&
)

Functions

Name Description

Public function Static

FGameTime

 

CreateDilated

(
    FTimeType InRealTimeSeconds,
    FTimeType InDeltaRealTimeSeconds,
    FTimeType InWorldTimeSeconds,
    FTimeType InDeltaWorldTimeSeconds
)

Public function Static

FGameTime

 

CreateUndilated

(
    FTimeType InRealTimeSeconds,
    FTimeType InDeltaRealTimeSeconds
)

Public function Const

FTimeType

 

GetDeltaRealTimeSeconds()

Returns frame delta time in seconds with no adjustment for time dilation and pause.

Public function Const

FTimeType

 

GetDeltaWorldTimeSeconds()

Returns frame delta time in seconds adjusted by e.g. time dilation.

Public function Const

FTimeType

 

GetRealTimeSeconds()

Returns time in seconds since level began play, but IS NOT paused when the game is paused, and IS NOT dilated/clamped.

Public function Const

float

 

GetTimeDilation()

Returns how much world time is slowed compared to real time.

Public function Static

FGameTime

 

GetTimeSinceAppStart()

Returns the game time since GStartTime.

Public function Const

FTimeType

 

GetWorldTimeSeconds()

Returns time in seconds since level began play, but IS paused when the game is paused, and IS dilated/clamped.

Public function Const

bool

 

IsPaused()

Returns whether the world time is paused.

Operators

Name Description

Public function

FGameTime &

 

operator=

(
    const FGameTime&
)

Typedefs

Name

Description

FTimeType