1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Hide GetTime() in Profiler.

This commit is contained in:
Bartosz Taudul
2017-09-23 21:09:46 +02:00
parent c0b1846a35
commit bd9ffc16b5
3 changed files with 9 additions and 8 deletions
+6
View File
@@ -5,6 +5,7 @@
#endif
#include <assert.h>
#include <chrono>
#include <limits>
#include <memory>
#include <string.h>
@@ -71,6 +72,11 @@ uint64_t Profiler::GetNewId()
return s_instance->m_id.fetch_add( 1, std::memory_order_relaxed );
}
int64_t Profiler::GetTime()
{
return std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();
}
uint64_t Profiler::ZoneBegin( QueueZoneBegin&& data )
{
auto id = GetNewId();