Navigation
API > API/Runtime > API/Runtime/Core
Generic implementation for most platforms
| Name | FGenericPlatformTime |
| Type | struct |
| Header File | /Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformTime.h |
| Include Path | #include "GenericPlatform/GenericPlatformTime.h" |
Syntax
struct FGenericPlatformTime
Derived Classes
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| LastIntervalCPUTimeInSeconds | double | GenericPlatform/GenericPlatformTime.h | |
| SecondsPerCycle | double | GenericPlatform/GenericPlatformTime.h | |
| SecondsPerCycle64 | double | GenericPlatform/GenericPlatformTime.h |
Functions
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AutoUpdateGameThreadCPUTime
(
double UpdateInterval |
Registers automatic updates of Game Thread CPU utilization | GenericPlatform/GenericPlatformTime.h | |
static uint32 Cycles() |
GenericPlatform/GenericPlatformTime.h | ||
static uint64 Cycles64() |
GenericPlatform/GenericPlatformTime.h | ||
static FCPUTime GetCPUTime() |
GenericPlatform/GenericPlatformTime.h | ||
static double GetLastIntervalCPUTimeInSeconds() |
GenericPlatform/GenericPlatformTime.h | ||
static double GetLastIntervalThreadCPUTimeInSeconds() |
Gets the per-thread CPU processing time (kernel + user) from the last update | GenericPlatform/GenericPlatformTime.h | |
static double GetSecondsPerCycle () |
Each platform implements these two functions, which return the current time in platform-specific cpu cycles. | GenericPlatform/GenericPlatformTime.h | |
static double GetSecondsPerCycle64() |
Returns seconds per cycle, to pair with Cycles64(). | GenericPlatform/GenericPlatformTime.h | |
static FCPUTime GetThreadCPUTime() |
Gets current threads CPU Utilization | GenericPlatform/GenericPlatformTime.h | |
static double InitTiming () |
Does per platform initialization of timing information and returns the current time. | GenericPlatform/GenericPlatformTime.h | |
static FString PrettyTime
(
double Seconds |
Returns a pretty-string for a time given in seconds. (I.e. "4:31 min", "2:16:30 hours", etc) | GenericPlatform/GenericPlatformTime.h | |
static double Seconds() |
GenericPlatform/GenericPlatformTime.h | ||
static uint64 SecondsToCycles64
(
double Seconds |
Convert seconds to cycles, can be added to Cycles64 to set a high resolution timeout | GenericPlatform/GenericPlatformTime.h | |
static TCHAR * StrDate
(
TCHAR* Dest, |
Get the system date | GenericPlatform/GenericPlatformTime.h | |
static TCHAR * StrTime
(
TCHAR* Dest, |
Get the system time | GenericPlatform/GenericPlatformTime.h | |
static const TCHAR * StrTimestamp () |
Returns a timestamp string built from the current date and time. | GenericPlatform/GenericPlatformTime.h | |
static void SystemTime
(
int32& Year, |
Returns the system time. | GenericPlatform/GenericPlatformTime.h | |
static float ToMilliseconds
(
const uint32 Cycles |
Converts cycles to milliseconds. | GenericPlatform/GenericPlatformTime.h | |
static double ToMilliseconds64
(
const uint64 Cycles |
Converts 64 bit cycles to milliseconds. | GenericPlatform/GenericPlatformTime.h | |
static float ToSeconds
(
const uint32 Cycles |
Converts cycles to seconds. | GenericPlatform/GenericPlatformTime.h | |
static double ToSeconds64
(
const uint64 Cycles |
Converts 64 bit cycles to seconds. | GenericPlatform/GenericPlatformTime.h | |
static bool UpdateCPUTime
(
float DeltaTime |
Updates CPU utilization, called through a delegate from the Core ticker. | GenericPlatform/GenericPlatformTime.h | |
static bool UpdateThreadCPUTime
(
float |
Updates current thread CPU utilization, calling is user defined per-thread (unused float parameter, is for FTicker compatibility). | GenericPlatform/GenericPlatformTime.h | |
static void UtcTime
(
int32& Year, |
Returns the UTC time. | GenericPlatform/GenericPlatformTime.h |