Send timer resolution to server.

This commit is contained in:
Bartosz Taudul 2017-09-29 18:32:07 +02:00
parent 6a2cb2c14e
commit efda50acb1
4 changed files with 4 additions and 0 deletions

View File

@ -163,6 +163,7 @@ void Profiler::Worker()
welcome.timerMul = m_timerMul; welcome.timerMul = m_timerMul;
welcome.timeBegin = m_timeBegin; welcome.timeBegin = m_timeBegin;
welcome.delay = m_delay; welcome.delay = m_delay;
welcome.resolution = m_resolution;
m_sock->Send( &welcome, sizeof( welcome ) ); m_sock->Send( &welcome, sizeof( welcome ) );
} }

View File

@ -31,6 +31,7 @@ struct WelcomeMessage
double timerMul; double timerMul;
uint64_t timeBegin; uint64_t timeBegin;
uint64_t delay; uint64_t delay;
uint64_t resolution;
}; };
#pragma pack() #pragma pack()

View File

@ -93,6 +93,7 @@ void View::Worker()
m_timerMul = welcome.timerMul; m_timerMul = welcome.timerMul;
m_frames.push_back( welcome.timeBegin * m_timerMul ); m_frames.push_back( welcome.timeBegin * m_timerMul );
m_delay = welcome.delay * m_timerMul; m_delay = welcome.delay * m_timerMul;
m_resolution = welcome.resolution * m_timerMul;
} }
m_hasData.store( true, std::memory_order_release ); m_hasData.store( true, std::memory_order_release );

View File

@ -133,6 +133,7 @@ private:
int64_t m_zvEndNext; int64_t m_zvEndNext;
uint64_t m_delay; uint64_t m_delay;
uint64_t m_resolution;
double m_timerMul; double m_timerMul;
}; };