UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
AndroidPlatformTime.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3
4/*=============================================================================================
5 AndroidTime.h: Android platform Time functions
6==============================================================================================*/
7
8#pragma once
10#include <sys/time.h>
11
12//@todo android: this entire file
13
18{
19 // android uses BSD time code from GenericPlatformTime
20 static inline double Seconds()
21 {
22 struct timespec ts;
24 return ((double) ts.tv_sec) + (((double) ts.tv_nsec) / 1000000000.0);
25 }
26
27 static inline uint32 Cycles()
28 {
29 struct timespec ts;
31 return (uint32) ((((uint64)ts.tv_sec) * 1000000ULL) + (((uint64)ts.tv_nsec) / 1000ULL));
32 }
33
34 static inline uint64 Cycles64()
35 {
36 struct timespec ts;
38 return ((((uint64)ts.tv_sec) * 1000000ULL) + (((uint64)ts.tv_nsec) / 1000ULL));
39 }
40};
41
FAndroidTime FPlatformTime
Definition AndroidPlatformTime.h:42
FPlatformTypes::uint64 uint64
A 64-bit unsigned integer.
Definition Platform.h:1117
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition AndroidPlatformTime.h:18
static uint32 Cycles()
Definition AndroidPlatformTime.h:27
static double Seconds()
Definition AndroidPlatformTime.h:20
static uint64 Cycles64()
Definition AndroidPlatformTime.h:34
Definition GenericPlatformTime.h:43