1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-28 20:23:51 +00:00

Time retrieval function.

This commit is contained in:
Bartosz Taudul 2017-09-10 20:07:38 +02:00
parent fc1b131c7a
commit e4356eb67e

View File

@ -1,4 +1,5 @@
#include <assert.h>
#include <chrono>
#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::nanoseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();
}
static Profiler* s_instance = nullptr;
Profiler::Profiler()