replace gettimeofday with chronos::systemtimeofday

This commit is contained in:
badaix 2017-03-14 19:33:14 +01:00
parent b0f1bee219
commit 5579eabfe0
8 changed files with 27 additions and 12 deletions

View file

@ -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;