mirror of
https://github.com/wolfpld/tracy
synced 2025-04-28 20:23:51 +00:00
Time retrieval function.
This commit is contained in:
parent
fc1b131c7a
commit
e4356eb67e
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user