Transfer profiler initialization time.

This commit is contained in:
Bartosz Taudul 2017-10-17 01:10:38 +02:00
parent 51f5ae4796
commit 1e3476cf36
3 changed files with 6 additions and 3 deletions

View File

@ -180,7 +180,8 @@ void Profiler::Worker()
welcome.lz4 = 1;
#endif
welcome.timerMul = m_timerMul;
welcome.timeBegin = m_timeBegin;
welcome.initBegin = s_initTime.val;
welcome.initEnd = m_timeBegin.load( std::memory_order_relaxed );
welcome.delay = m_delay;
welcome.resolution = m_resolution;
welcome.epoch = m_epoch;

View File

@ -34,7 +34,8 @@ struct WelcomeMessage
{
uint8_t lz4;
double timerMul;
uint64_t timeBegin;
uint64_t initBegin;
uint64_t initEnd;
uint64_t delay;
uint64_t resolution;
uint64_t epoch;

View File

@ -312,7 +312,8 @@ void View::Worker()
if( !m_sock.Read( &welcome, sizeof( welcome ), &tv, ShouldExit ) ) goto close;
lz4 = welcome.lz4;
m_timerMul = welcome.timerMul;
m_frames.push_back( welcome.timeBegin * m_timerMul );
m_frames.push_back( welcome.initBegin * m_timerMul );
m_frames.push_back( welcome.initEnd * m_timerMul );
m_delay = welcome.delay * m_timerMul;
m_resolution = welcome.resolution * m_timerMul;