summaryrefslogtreecommitdiffstats
path: root/messagebus_test/src/tests/speed/cpp-client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'messagebus_test/src/tests/speed/cpp-client.cpp')
-rw-r--r--messagebus_test/src/tests/speed/cpp-client.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/messagebus_test/src/tests/speed/cpp-client.cpp b/messagebus_test/src/tests/speed/cpp-client.cpp
index 43d030b519b..ff00128037a 100644
--- a/messagebus_test/src/tests/speed/cpp-client.cpp
+++ b/messagebus_test/src/tests/speed/cpp-client.cpp
@@ -7,6 +7,8 @@
#include <vespa/messagebus/testlib/simplemessage.h>
#include <vespa/messagebus/testlib/simpleprotocol.h>
#include <vespa/messagebus/testlib/simplereply.h>
+#include <vespa/vespalib/util/time.h>
+#include <thread>
#include <vespa/fastos/timestamp.h>
#include <vespa/fastos/app.h>
@@ -100,7 +102,7 @@ App::Main()
Client client(mb.getMessageBus(), SourceSessionParams().setTimeout(30s));
// let the system 'warm up'
- FastOS_Thread::Sleep(5000);
+ std::this_thread::sleep_for(5s);
// inject messages into the feedback loop
for (uint32_t i = 0; i < 1024; ++i) {
@@ -108,7 +110,7 @@ App::Main()
}
// let the system 'warm up'
- FastOS_Thread::Sleep(5000);
+ std::this_thread::sleep_for(5s);
fastos::StopWatch stopWatch;
uint32_t okBefore = 0;
@@ -117,7 +119,7 @@ App::Main()
uint32_t failAfter = 0;
client.sample(okBefore, failBefore);
- FastOS_Thread::Sleep(10000); // Benchmark time
+ std::this_thread::sleep_for(10s); // Benchmark time
fastos::TimeStamp elapsed = stopWatch.elapsed();
client.sample(okAfter, failAfter);
double time = elapsed.ms();