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

Move sending data to a separate function.

This commit is contained in:
Bartosz Taudul
2017-09-14 19:07:56 +02:00
parent cd9218e952
commit 76df000467
2 changed files with 24 additions and 14 deletions
+5
View File
@@ -12,6 +12,8 @@
namespace tracy
{
class Socket;
static inline int64_t GetTime()
{
return std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();
@@ -31,6 +33,8 @@ public:
private:
void Worker();
bool SendData( const char* data, size_t len );
static Profiler* Instance();
static moodycamel::ProducerToken& GetToken()
{
@@ -43,6 +47,7 @@ private:
std::atomic<bool> m_shutdown;
moodycamel::ConcurrentQueue<QueueItem> m_queue;
std::atomic<uint64_t> m_id;
std::unique_ptr<Socket> m_sock;
};
};