mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Fix defines when compiling with -Werror=undef
Some ARM defines fail when compiling with -Werror=undef as they rely on the missing define mapping to 0.
This commit is contained in:
parent
619523b43e
commit
1151ec1328
@ -28,7 +28,7 @@
|
|||||||
# define TRACY_HW_TIMER
|
# define TRACY_HW_TIMER
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined TRACY_HW_TIMER || ( __ARM_ARCH >= 6 && !defined CLOCK_MONOTONIC_RAW )
|
#if !defined TRACY_HW_TIMER || ( defined __ARM_ARCH && __ARM_ARCH >= 6 && !defined CLOCK_MONOTONIC_RAW )
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -120,9 +120,9 @@ public:
|
|||||||
static tracy_force_inline int64_t GetTime()
|
static tracy_force_inline int64_t GetTime()
|
||||||
{
|
{
|
||||||
#ifdef TRACY_HW_TIMER
|
#ifdef TRACY_HW_TIMER
|
||||||
# if TARGET_OS_IOS == 1
|
# if defined TARGET_OS_IOS && TARGET_OS_IOS == 1
|
||||||
return mach_absolute_time();
|
return mach_absolute_time();
|
||||||
# elif __ARM_ARCH >= 6
|
# elif defined __ARM_ARCH && __ARM_ARCH >= 6
|
||||||
# ifdef CLOCK_MONOTONIC_RAW
|
# ifdef CLOCK_MONOTONIC_RAW
|
||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
clock_gettime( CLOCK_MONOTONIC_RAW, &ts );
|
clock_gettime( CLOCK_MONOTONIC_RAW, &ts );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user