diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2019-12-09 04:09:05 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2019-12-16 23:48:46 +0000 |
commit | 225be01d5405c179584eb7fc08309c8f4a08fb22 (patch) | |
tree | fe50a91214b2db66a0df797d2dc46e51ab4bfcd1 /vespalog/src | |
parent | c72bdc628b4493bfb2974ab3fe479d2af0d376f1 (diff) |
GC unused timestamp in schema.
Diffstat (limited to 'vespalog/src')
-rw-r--r-- | vespalog/src/test/threads/testthreads.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vespalog/src/test/threads/testthreads.cpp b/vespalog/src/test/threads/testthreads.cpp index d23e00930fd..ab7ddad3da7 100644 --- a/vespalog/src/test/threads/testthreads.cpp +++ b/vespalog/src/test/threads/testthreads.cpp @@ -1,6 +1,5 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespa/fastos/app.h> -#include <vespa/fastos/timestamp.h> #include <vespa/fastos/thread.h> #include <vespa/log/bufferedlogger.h> #include <array> @@ -13,6 +12,7 @@ using std::string; using namespace std::chrono_literals; +using namespace std::chrono; LOG_SETUP(".threadtest"); @@ -104,10 +104,10 @@ ThreadTester::Main() pool.NewThread(loggers[i].get()); } - fastos::StopWatch timer; + steady_clock::time_point start = steady_clock::now(); // Reduced runtime to half as the test now repeats itself to test with // buffering. (To avoid test taking a minute) - while (timer.elapsed().ms() < 15 * 1000) { + while ((steady_clock::now() - start) < 15s) { unlink(_argv[1]); std::this_thread::sleep_for(1ms); } @@ -115,8 +115,8 @@ ThreadTester::Main() for (int i = 0; i < numLoggers; i++) { loggers[i]->_useLogBuffer = true; } - timer.restart(); - while (timer.elapsed().ms() < 15 * 1000) { + start = steady_clock::now(); + while ((steady_clock::now() - start) < 15s) { unlink(_argv[1]); std::this_thread::sleep_for(1ms); } |