summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-18 17:51:11 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-18 17:51:11 +0000
commit97d72df6b00bee6b9b9b50ec1e502ecad8607ac8 (patch)
treeb5ef0aedf4930508d9c65267a3480a831ca6238f /libcxx/test/support
parentd9ed9c462b62fdf374e809a14ce1ada2b7653c06 (diff)
downloadbcm5719-llvm-97d72df6b00bee6b9b9b50ec1e502ecad8607ac8.tar.gz
bcm5719-llvm-97d72df6b00bee6b9b9b50ec1e502ecad8607ac8.zip
Use monotonic clock in synthetic SleepFor test helper
llvm-svn: 273089
Diffstat (limited to 'libcxx/test/support')
-rw-r--r--libcxx/test/support/filesystem_test_helper.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/test/support/filesystem_test_helper.hpp b/libcxx/test/support/filesystem_test_helper.hpp
index 8dcf53aee75..fdab4d6153f 100644
--- a/libcxx/test/support/filesystem_test_helper.hpp
+++ b/libcxx/test/support/filesystem_test_helper.hpp
@@ -388,9 +388,9 @@ inline std::error_code GetTestEC() {
// available in single-threaded mode.
void SleepFor(std::chrono::seconds dur) {
using namespace std::chrono;
- const auto curr_time = system_clock::now();
+ const auto curr_time = steady_clock::now();
auto wake_time = curr_time + dur;
- while (system_clock::now() < wake_time)
+ while (steady_clock::now() < wake_time)
;
}
OpenPOWER on IntegriCloud