Navigation
API > API/Runtime > API/Runtime/Engine
Contains all the timings of a gaming frame, to handle pause and time dilation (for instance bullet time) of the world.
| Name | FGameTime |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/GameTime.h |
| Include Path | #include "GameTime.h" |
Syntax
struct FGameTime
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FGameTime () |
GameTime.h | ||
| GameTime.h | |||
FGameTime
(
double InRealTimeSeconds, |
GameTime.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| DeltaRealTimeSeconds | float | GameTime.h | ||
| DeltaWorldTimeSeconds | float | GameTime.h | ||
| RealTimeSeconds | double | GameTime.h | ||
| WorldTimeSeconds | double | GameTime.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
float GetDeltaRealTimeSeconds() |
Returns frame delta time in seconds with no adjustment for time dilation and pause. | GameTime.h | |
float GetDeltaWorldTimeSeconds() |
Returns frame delta time in seconds adjusted by e.g. time dilation. | GameTime.h | |
double GetRealTimeSeconds() |
Returns time in seconds since level began play, but IS NOT paused when the game is paused, and IS NOT dilated/clamped. | GameTime.h | |
float GetTimeDilation() |
Returns how much world time is slowed compared to real time. | GameTime.h | |
double GetWorldTimeSeconds() |
Returns time in seconds since level began play, but IS paused when the game is paused, and IS dilated/clamped. | GameTime.h | |
bool IsPaused() |
Returns whether the world time is paused. | GameTime.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FGameTime CreateDilated
(
double InRealTimeSeconds, |
GameTime.h | ||
static FGameTime CreateUndilated
(
double InRealTimeSeconds, |
GameTime.h | ||
static FGameTime GetTimeSinceAppStart() |
Returns the game time since GStartTime. | GameTime.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| GameTime.h |