UDocumentation
UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ApplePlatformTime.h
Go to the documentation of this file.
1
// Copyright Epic Games, Inc. All Rights Reserved.
2
3
/*=============================================================================================
4
ApplePlatformTime.h: Apple platform Time functions
5
==============================================================================================*/
6
7
#pragma once
8
#include "
GenericPlatform/GenericPlatformTime.h
"
9
#include "
CoreTypes.h
"
10
#if PLATFORM_MAC
11
#include "
Mac/MacSystemIncludes.h
"
12
#elif PLATFORM_IOS
13
#include "
IOS/IOSSystemIncludes.h
"
14
#endif
15
28
struct
CORE_API
FApplePlatformTime
:
public
FGenericPlatformTime
29
{
30
static
double
InitTiming();
31
32
static
inline
double
Seconds
()
33
{
34
uint64
Cycles =
mach_absolute_time
();
35
// Add big number to make bugs apparent where return value is being passed to float
36
return
Cycles *
GetSecondsPerCycle
() + 16777216.0;
37
}
38
39
static
inline
uint32
Cycles
()
40
{
41
uint64
Cycles =
mach_absolute_time
();
42
return
Cycles;
43
}
44
45
static
inline
uint64
Cycles64
()
46
{
47
uint64
Cycles =
mach_absolute_time
();
48
return
Cycles;
49
}
50
51
static
FCPUTime
GetCPUTime
();
52
};
53
54
typedef
FApplePlatformTime
FPlatformTime
;
FPlatformTime
FApplePlatformTime FPlatformTime
Definition
ApplePlatformTime.h:54
CoreTypes.h
uint64
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition
Platform.h:1117
StaticCastSharedRef
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition
SharedPointer.h:127
GenericPlatformTime.h
IOSSystemIncludes.h
MacSystemIncludes.h
uint32
uint32_t uint32
Definition
binka_ue_file_header.h:6
FApplePlatformTime
Definition
ApplePlatformTime.h:29
FApplePlatformTime::Cycles
static uint32 Cycles()
Definition
ApplePlatformTime.h:39
FApplePlatformTime::Seconds
static double Seconds()
Definition
ApplePlatformTime.h:32
FApplePlatformTime::Cycles64
static uint64 Cycles64()
Definition
ApplePlatformTime.h:45
FCPUTime
Definition
GenericPlatformTime.h:16
FGenericPlatformTime
Definition
GenericPlatformTime.h:43
FGenericPlatformTime::GetSecondsPerCycle
static double GetSecondsPerCycle()
Definition
GenericPlatformTime.h:177
FGenericPlatformTime::GetCPUTime
static FCPUTime GetCPUTime()
Definition
GenericPlatformTime.h:135
Engine
Source
Runtime
Core
Public
Apple
ApplePlatformTime.h
Generated by
1.9.8