parent
1a29b44ad6
commit
107e66b65a
@ -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
|
Loading…
Reference in new issue