![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <Timeout.h>
Public Member Functions | |
| operator bool () const | |
| bool | IsExpired () const |
| UE_FORCEINLINE_HINT bool | WillNeverExpire () const |
| UE_FORCEINLINE_HINT bool | IsAlwaysExpired () const |
| void | SetToExpired () |
| FTimeout (double TimeoutSeconds) | |
| FTimeout (const FTimeout &BaseTimeout, double TimeoutSeconds) | |
| double | GetElapsedSeconds () const |
| double | GetRemainingSeconds () const |
| double | GetTimeoutSeconds () const |
| void | SetTimeoutSeconds (double TimeoutSeconds) |
| void | ModifyTimeoutSeconds (double DeltaTimeoutSeconds) |
| FTimeout (FTimespan TimeoutValue) | |
| FTimespan | GetElapsedTime () const |
| FTimespan | GetRemainingTime () const |
| FTimespan | GetTimeoutValue () const |
| uint32 | GetRemainingRoundedUpMilliseconds () const |
Static Public Member Functions | |
| static FTimeout | Never () |
| static FTimeout | AlwaysExpired () |
Friends | |
| bool | operator== (FTimeout Left, FTimeout Right) |
| bool | operator!= (FTimeout Left, FTimeout Right) |
Utility class to create a timeout that will expire at a point in the future. Example usage:
FTimeout TimeoutFromTimespan(FTimespan::FromMilliseconds(2)); FTimeout TimeoutFromSeconds(0.002); while (!TimeoutFromSeconds.IsExpired()) { ... }
|
inlineexplicit |
Construct a timeout that starts right now and will end after the passed in time in seconds
Construct a timeout that started at the same time as BaseTimeout, but with a new duration
|
inlineexplicit |
Construct a timeout that starts right now and will end after the passed in timespan
Create a timeout that will always return true for IsExpired
|
inline |
Returns time since the timeout was created, in seconds
|
inline |
Returns time since the timeout was created, as a timespan
|
inline |
Intended for use in waiting functions, e.g. FEvent::Wait() returns the whole number (rounded up) of remaining milliseconds, clamped into [0, MAX_uint32] range
|
inline |
Returns time left until the timeout expires (which can be negative) in seconds
|
inline |
Returns time left until the timeout expires (which can be negative) as a timespan
|
inline |
Returns duration of timeout in seconds
|
inline |
Returns duration of timeout as a timespan
|
inline |
Returns true if this was created from AlwaysExpired and does not need to be repeatedly checked
|
inline |
Return true if elapsed time is greater than the initially requested timeout
Safely modify the remaining time by adding the delta time in seconds to the timeout
Create a timeout that will never return true for IsExpired
|
inlineexplicit |
Sets the timeout to new value in seconds
|
inline |
Set this timeout to explicitly expired without recalculating start time
|
inline |
Returns true if this was created from Never and does not need to be repeatedly checked