mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Send current time in on-demand welcome message.
This commit is contained in:
parent
48df667a37
commit
fd9fc880a6
@ -1188,6 +1188,7 @@ void Profiler::Worker()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
|
const auto currentTime = GetTime();
|
||||||
ClearQueues( token );
|
ClearQueues( token );
|
||||||
m_connectionId.fetch_add( 1, std::memory_order_release );
|
m_connectionId.fetch_add( 1, std::memory_order_release );
|
||||||
m_isConnected.store( true, std::memory_order_release );
|
m_isConnected.store( true, std::memory_order_release );
|
||||||
@ -1202,6 +1203,7 @@ void Profiler::Worker()
|
|||||||
#ifdef TRACY_ON_DEMAND
|
#ifdef TRACY_ON_DEMAND
|
||||||
OnDemandPayloadMessage onDemand;
|
OnDemandPayloadMessage onDemand;
|
||||||
onDemand.frames = m_frameCount.load( std::memory_order_relaxed );
|
onDemand.frames = m_frameCount.load( std::memory_order_relaxed );
|
||||||
|
onDemand.currentTime = currentTime;
|
||||||
|
|
||||||
m_sock->Send( &onDemand, sizeof( onDemand ) );
|
m_sock->Send( &onDemand, sizeof( onDemand ) );
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
enum : uint32_t { ProtocolVersion = 8 };
|
enum : uint32_t { ProtocolVersion = 9 };
|
||||||
enum : uint32_t { BroadcastVersion = 0 };
|
enum : uint32_t { BroadcastVersion = 0 };
|
||||||
|
|
||||||
using lz4sz_t = uint32_t;
|
using lz4sz_t = uint32_t;
|
||||||
@ -76,6 +76,7 @@ enum { WelcomeMessageSize = sizeof( WelcomeMessage ) };
|
|||||||
struct OnDemandPayloadMessage
|
struct OnDemandPayloadMessage
|
||||||
{
|
{
|
||||||
uint64_t frames;
|
uint64_t frames;
|
||||||
|
uint64_t currentTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum { OnDemandPayloadMessageSize = sizeof( OnDemandPayloadMessage ) };
|
enum { OnDemandPayloadMessageSize = sizeof( OnDemandPayloadMessage ) };
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user