From e4356eb67efd138b5c9cd9e652106ddf796ac231 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 10 Sep 2017 20:07:38 +0200 Subject: [PATCH] Time retrieval function. --- client/TracyProfiler.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 7626894e..2ea45e56 100755 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -1,4 +1,5 @@ #include +#include #include "TracyProfiler.hpp" #include "TracySystem.hpp" @@ -9,6 +10,12 @@ namespace tracy extern const char* PointerCheckA; const char* PointerCheckB = "tracy"; +static inline int64_t GetTime() +{ + return std::chrono::duration_cast( std::chrono::high_resolution_clock::now().time_since_epoch() ).count(); +} + + static Profiler* s_instance = nullptr; Profiler::Profiler()