mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-10 23:56:43 +02:00
portable sleep function
This commit is contained in:
parent
17879618c7
commit
951548f412
12 changed files with 35 additions and 19 deletions
|
@ -19,7 +19,6 @@
|
|||
#include <memory>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "fileStream.h"
|
||||
#include "encoder/encoderFactory.h"
|
||||
|
@ -92,7 +91,7 @@ void FileStream::worker()
|
|||
if (nextTick >= currentTick)
|
||||
{
|
||||
// logO << "sleep: " << nextTick - currentTick << "\n";
|
||||
usleep((nextTick - currentTick) * 1000);
|
||||
chronos::sleep(nextTick - currentTick);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue