Browse Source

[C#] Fix iOS issue with easy_profiler (force std::chrono::high_resolution_clock)

Josh Engebretson 8 years ago
parent
commit
05974d7cba
1 changed files with 7 additions and 0 deletions
  1. 7 0
      Source/ThirdParty/easy_profiler/easy_profiler_core/CMakeLists.txt

+ 7 - 0
Source/ThirdParty/easy_profiler/easy_profiler_core/CMakeLists.txt

@@ -16,6 +16,13 @@ endif (WIN32)
 set(BUILD_WITH_CHRONO_STEADY_CLOCK     OFF    CACHE BOOL   "Use std::chrono::steady_clock as a timer" )
 set(BUILD_WITH_CHRONO_HIGH_RESOLUTION_CLOCK OFF CACHE BOOL "Use std::chrono::high_resolution_clock as a timer")
 
+# ATOMIC BEGIN
+# force std::chrono::high_resolution_clock usage on iOS
+if (IOS)
+    set(BUILD_WITH_CHRONO_HIGH_RESOLUTION_CLOCK ON)
+endif()
+# ATOMIC END
+
 message(STATUS "-------- EASY_PROFILER OPTIONS: --------")
 if (BUILD_WITH_CHRONO_STEADY_CLOCK)
     message(STATUS "  Use std::chrono::steady_clock as a timer")