diff options
author | dmauro <dmauro@google.com> | 2021-10-25 17:40:39 (GMT) |
---|---|---|
committer | CJ Johnson <johnsoncj@google.com> | 2021-11-03 17:45:40 (GMT) |
commit | 489ef888d942ecd40063b0e074b2901a2c1754bb (patch) | |
tree | b9942c8fba7363ef1050132bb00b98e95736c94c /googletest/include/gtest/internal | |
parent | f503588aeee4629e5673f2d88ddec01c9ed4bd6b (diff) | |
download | googletest-489ef888d942ecd40063b0e074b2901a2c1754bb.zip googletest-489ef888d942ecd40063b0e074b2901a2c1754bb.tar.gz googletest-489ef888d942ecd40063b0e074b2901a2c1754bb.tar.bz2 |
Googletest export
Remove GoogleTest's SleepMilliseconds function.
It is only used in tests and a portable implementation is available.
PiperOrigin-RevId: 405437102
Diffstat (limited to 'googletest/include/gtest/internal')
-rw-r--r-- | googletest/include/gtest/internal/gtest-port.h | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index de00483..63ef13c 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -1163,21 +1163,8 @@ void ClearInjectableArgvs(); // Defines synchronization primitives. #if GTEST_IS_THREADSAFE -# if GTEST_HAS_PTHREAD -// Sleeps for (roughly) n milliseconds. This function is only for testing -// Google Test's own constructs. Don't use it in user tests, either -// directly or indirectly. -inline void SleepMilliseconds(int n) { - const timespec time = { - 0, // 0 seconds. - n * 1000L * 1000L, // And n ms. - }; - nanosleep(&time, nullptr); -} - -# elif GTEST_OS_WINDOWS -GTEST_API_ void SleepMilliseconds(int n); +# if GTEST_OS_WINDOWS // Provides leak-safe Windows kernel handle ownership. // Used in death tests and in threading support. class GTEST_API_ AutoHandle { @@ -1206,7 +1193,6 @@ class GTEST_API_ AutoHandle { GTEST_DISALLOW_COPY_AND_ASSIGN_(AutoHandle); }; - # endif # if GTEST_HAS_NOTIFICATION_ |