mirror of
https://github.com/falk-werner/webfuse-provider
synced 2026-03-02 04:09:18 +00:00
chore: replaced msleep by std::this_thread::sleep_for
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
#include "webfuse/utils/msleep.hpp"
|
||||
#include <ctime>
|
||||
|
||||
namespace webfuse_test
|
||||
{
|
||||
|
||||
void msleep(long millis)
|
||||
{
|
||||
long const secs_per_msec = 1000;
|
||||
long const msecs_per_nsec = (1000 * 1000);
|
||||
|
||||
long const seconds = millis / secs_per_msec;
|
||||
long const nanos = (millis % secs_per_msec) * msecs_per_nsec;
|
||||
|
||||
struct timespec timeout = { seconds, nanos };
|
||||
while (0 != nanosleep(&timeout, &timeout));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
#ifndef WF_TEST_MSLEEP_HPP
|
||||
#define WF_TEST_MSLEEP_HPP
|
||||
|
||||
namespace webfuse_test
|
||||
{
|
||||
|
||||
extern void msleep(long millis);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user