FGenericPlatformTime

Generic implementation for most platforms

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FGenericPlatformTime

FHoloLensTime

FUnixTime

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/GenericPlatform/GenericPlatformTime.h

Include

#include "GenericPlatform/GenericPlatformTime.h"

Syntax

struct FGenericPlatformTime

Remarks

Generic implementation for most platforms

Functions

Name Description

Public function Static

void

 

AutoUpdateGameThreadCPUTime

(
    double UpdateInterval
)

Registers automatic updates of Game Thread CPU utilization

Public function Static

uint32

 

Cycles()

Public function Static

uint64

 

Cycles64()

Public function Static

FCPUTime

 

GetCPUTime()

Public function Static

double

 

GetLastIntervalCPUTimeInSeconds()

Public function Static

double

 

GetLastIntervalThreadCPUTimeInSeconds()

Gets the per-thread CPU processing time (kernel + user) from the last update

Public function Static

double

 

GetSecondsPerCycle()

Public function Static

double

 

GetSecondsPerCycle64()

Public function Static

FCPUTime

 

GetThreadCPUTime()

Gets current threads CPU Utilization

Public function Static

double

 

InitTiming()

Does per platform initialization of timing information and returns the current time.

Public function 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)

Public function Static

double

 

Seconds()

Public function Static

TCHAR *

 

StrDate

(
    TCHAR* Dest,
    SIZE_T DestSize
)

Get the system date

Public function Static

TCHAR *

 

StrTime

(
    TCHAR* Dest,
    SIZE_T DestSize
)

Get the system time

Public function Static

const TCHAR ...

 

StrTimestamp()

Returns a timestamp string built from the current date and time.

Public function Static

void

 

SystemTime

(
    int32& Year,
    int32& Month,
    int32& DayOfWeek,
    int32& Day,
    int32& Hour,
    int32& Min,
    int32& Sec,
    int32& MSec
)

Returns the system time.

Public function Static

float

 

ToMilliseconds

(
    const uint32 Cycles
)

Converts cycles to milliseconds.

Public function Static

double

 

ToMilliseconds64

(
    const uint64 Cycles
)

Converts cycles to milliseconds.

Public function Static

float

 

ToSeconds

(
    const uint32 Cycles
)

Converts cycles to seconds.

Public function Static

double

 

ToSeconds64

(
    const uint64 Cycles
)

Converts cycles to seconds.

Public function Static

bool

 

UpdateCPUTime

(
    float DeltaTime
)

Updates CPU utilization, called through a delegate from the Core ticker.

Public function Static

bool

 

UpdateThreadCPUTime

(
    float
)

Updates current thread CPU utilization, calling is user defined per-thread (unused float parameter, is for FTicker compatibility).

Public function Static

void

 

UtcTime

(
    int32& Year,
    int32& Month,
    int32& DayOfWeek,
    int32& Day,
    int32& Hour,
    int32& Min,
    int32& Sec,
    int32& MSec
)

Returns the UTC time.

Constants