diff options
Diffstat (limited to 'test/util/test_util.cc')
-rw-r--r-- | test/util/test_util.cc | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/test/util/test_util.cc b/test/util/test_util.cc index c52fd9a4a..bf0029951 100644 --- a/test/util/test_util.cc +++ b/test/util/test_util.cc @@ -18,7 +18,6 @@ #include <stdlib.h> #include <string.h> #include <sys/stat.h> -#include <sys/syscall.h> #include <sys/types.h> #include <sys/uio.h> #include <sys/utsname.h> @@ -211,21 +210,6 @@ std::vector<std::vector<struct iovec>> GenerateIovecs(uint64_t total_size, return result; } -void SleepSafe(absl::Duration duration) { - if (duration == absl::ZeroDuration()) { - return; - } - - struct timespec ts = absl::ToTimespec(duration); - int ret; - while (1) { - ret = syscall(__NR_nanosleep, &ts, &ts); - if (ret == 0 || (ret <= 0 && errno != EINTR)) { - break; - } - } -} - uint64_t Megabytes(uint64_t n) { // Overflow check, upper 20 bits in n shouldn't be set. TEST_CHECK(!(0xfffff00000000000 & n)); |