portable sleep function

This commit is contained in:
badaix 2016-10-28 10:10:58 +02:00
parent 17879618c7
commit 951548f412
12 changed files with 35 additions and 19 deletions

View file

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