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

Exchange time and id in queue header and data structs.

This commit is contained in:
Bartosz Taudul
2017-09-14 01:07:14 +02:00
parent 3e1b736b34
commit d999f35dfa
4 changed files with 19 additions and 18 deletions
+8 -2
View File
@@ -2,6 +2,7 @@
#define __TRACYPROFILER_HPP__
#include <atomic>
#include <chrono>
#include <stdint.h>
#include <thread>
@@ -11,6 +12,11 @@
namespace tracy
{
static inline int64_t GetTime()
{
return std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();
}
class Profiler
{
public:
@@ -19,8 +25,8 @@ public:
static uint64_t GetNewId();
static void ZoneBegin( QueueZoneBegin&& data );
static void ZoneEnd( QueueZoneEnd&& data );
static uint64_t ZoneBegin( QueueZoneBegin&& data );
static void ZoneEnd( uint64_t id, QueueZoneEnd&& data );
private:
void Worker();