mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-09 15:16:42 +02:00
use timeval instead of double for time sync
This commit is contained in:
parent
6ea10c77dd
commit
14b5abe5d7
6 changed files with 21 additions and 15 deletions
|
@ -250,8 +250,8 @@ void StreamServer::onMessageReceived(StreamSession* connection, const msg::BaseM
|
|||
{
|
||||
msg::Time timeMsg;
|
||||
timeMsg.refersTo = requestMsg.id;
|
||||
timeMsg.latency = (requestMsg.received.sec - requestMsg.sent.sec) + (requestMsg.received.usec - requestMsg.sent.usec) / 1000000.;
|
||||
logD << "Latency: " << timeMsg.latency << ", refers to: " << timeMsg.refersTo << "\n";
|
||||
timeMsg.latency = requestMsg.received - requestMsg.sent;
|
||||
// logO << "Latency sec: " << timeMsg.latency.sec << ", usec: " << timeMsg.latency.usec << ", refers to: " << timeMsg.refersTo << "\n";
|
||||
connection->send(&timeMsg);
|
||||
|
||||
// refresh connection state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue