From 67edc2d77fa0c75749273a43d5772f4d7914d74c Mon Sep 17 00:00:00 2001 From: Ming Li Date: Wed, 28 Aug 2024 20:55:26 +0200 Subject: [PATCH] Rename the function now() as well --- easy_profiler_core/include/easy/profiler.h | 6 +++--- easy_profiler_core/profiler.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/easy_profiler_core/include/easy/profiler.h b/easy_profiler_core/include/easy/profiler.h index d8bd570..ac4b530 100644 --- a/easy_profiler_core/include/easy/profiler.h +++ b/easy_profiler_core/include/easy/profiler.h @@ -464,7 +464,7 @@ namespace profiler { \ingroup profiler */ - PROFILER_API timestamp_t now(); + PROFILER_API timestamp_t timeNow(); /** Convert ticks to nanoseconds. @@ -766,7 +766,7 @@ namespace profiler { } #else - inline EASY_CONSTEXPR_FCN timestamp_t now() { return 0; } + inline EASY_CONSTEXPR_FCN timestamp_t timeNow() { return 0; } inline EASY_CONSTEXPR_FCN timestamp_t toNanoseconds(timestamp_t) { return 0; } inline EASY_CONSTEXPR_FCN timestamp_t toMicroseconds(timestamp_t) { return 0; } inline const BaseBlockDescriptor* registerDescription(EasyBlockStatus, const char*, const char*, const char*, int, block_type_t, color_t, bool = false) @@ -898,7 +898,7 @@ namespace profiler { \ingroup profiler */ - EASY_FORCE_INLINE timestamp_t currentTime() { return now(); } + EASY_FORCE_INLINE timestamp_t currentTime() { return timeNow(); } ////////////////////////////////////////////////////////////////////// diff --git a/easy_profiler_core/profiler.cpp b/easy_profiler_core/profiler.cpp index 4dd8b86..c331391 100644 --- a/easy_profiler_core/profiler.cpp +++ b/easy_profiler_core/profiler.cpp @@ -127,7 +127,7 @@ PROFILER_API const char* apiVersionName() #if !defined(EASY_PROFILER_API_DISABLED) -PROFILER_API profiler::timestamp_t now() +PROFILER_API profiler::timestamp_t timeNow() { return profiler::clock::now(); } @@ -295,7 +295,7 @@ PROFILER_API profiler::timestamp_t main_thread_frameTimeLocalAvg(profiler::Durat #else // EASY_PROFILER_API_DISABLED -PROFILER_API profiler::timestamp_t now() { return 0; } +PROFILER_API profiler::timestamp_t timeNow() { return 0; } PROFILER_API profiler::timestamp_t toNanoseconds(profiler::timestamp_t) { return 0; } PROFILER_API profiler::timestamp_t toMicroseconds(profiler::timestamp_t) { return 0; }