mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-11 23:31:42 +02:00
replace gettimeofday with chronos::systemtimeofday
This commit is contained in:
parent
b0f1bee219
commit
5579eabfe0
8 changed files with 27 additions and 12 deletions
|
@ -69,7 +69,7 @@ void PipeStream::worker()
|
|||
if (fd_ != -1)
|
||||
close(fd_);
|
||||
fd_ = open(uri_.path.c_str(), O_RDONLY | O_NONBLOCK);
|
||||
gettimeofday(&tvChunk, NULL);
|
||||
chronos::systemtimeofday(&tvChunk);
|
||||
tvEncodedChunk_ = tvChunk;
|
||||
long nextTick = chronos::getTickCount();
|
||||
try
|
||||
|
@ -117,7 +117,7 @@ void PipeStream::worker()
|
|||
}
|
||||
else
|
||||
{
|
||||
gettimeofday(&tvChunk, NULL);
|
||||
chronos::systemtimeofday(&tvChunk);
|
||||
tvEncodedChunk_ = tvChunk;
|
||||
pcmListener_->onResync(this, currentTick - nextTick);
|
||||
nextTick = currentTick;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue