mirror of
https://github.com/badaix/snapcast.git
synced 2025-08-03 16:48:52 +02:00
timeMsg
git-svn-id: svn://elaine/murooma/trunk@264 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
8f01f2001b
commit
c0dde672ce
1 changed files with 5 additions and 0 deletions
|
@ -63,6 +63,7 @@ struct tv
|
|||
-1
|
||||
-0.1
|
||||
*/
|
||||
//(timeMsg.received.sec - timeMsg.sent.sec) * 1000000 + (timeMsg.received.usec - timeMsg.sent.usec)
|
||||
tv operator-(const tv& other)
|
||||
{
|
||||
tv result(*this);
|
||||
|
@ -73,6 +74,10 @@ struct tv
|
|||
result.sec += 1;
|
||||
result.usec = 1000000 - result.usec;
|
||||
}
|
||||
else if (result.usec < 0)
|
||||
{
|
||||
result.usec *= -1;
|
||||
}
|
||||
/* else if (result.usec >= 1000000)
|
||||
{
|
||||
result.usec -= 1000000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue