Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
Timeout.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "Misc/Timespan.h"
6#include "HAL/PlatformTime.h"
7#include "CoreTypes.h"
8
9namespace UE
10{
11 // utility class to handle timeouts
12 // usage:
13 // ------------------------------------
14 // FTimeout Timeout(FTimespan::FromMilliseconds(2));
15 // while (!Timeout) { ... }
16 // ------------------------------------
18 {
19 public:
20 explicit FTimeout(FTimespan Value)
21 : Timeout(Value)
22 {
23 }
24
25 explicit operator bool() const
26 {
28 }
29
31 {
33 }
34
36 {
38 }
39
40 private:
43 };
44}
FWindowsPlatformTime FPlatformTime
FTimespan Start
Definition Timeout.h:41
FTimespan GetElapsedTime() const
Definition Timeout.h:30
FTimeout(FTimespan Value)
Definition Timeout.h:20
FTimespan GetRemainingTime() const
Definition Timeout.h:35
FTimespan Timeout
Definition Timeout.h:42
operator bool() const
Definition Timeout.h:25
Definition Vector.h:40
bool operator>=(const FTimespan &Other) const
Definition Timespan.h:309
static FTimespan FromSeconds(double Seconds)
Definition Timespan.h:673
FTimespan operator-(const FTimespan &Other) const
Definition Timespan.h:184
static FORCEINLINE double Seconds()