aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib/src/tests/simple_thread_bundle/threading_speed_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vespalib/src/tests/simple_thread_bundle/threading_speed_test.cpp')
-rw-r--r--vespalib/src/tests/simple_thread_bundle/threading_speed_test.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/vespalib/src/tests/simple_thread_bundle/threading_speed_test.cpp b/vespalib/src/tests/simple_thread_bundle/threading_speed_test.cpp
index b113e7a2284..5b6df6eef4e 100644
--- a/vespalib/src/tests/simple_thread_bundle/threading_speed_test.cpp
+++ b/vespalib/src/tests/simple_thread_bundle/threading_speed_test.cpp
@@ -2,7 +2,7 @@
#include <vespa/vespalib/testkit/test_kit.h>
#include <vespa/vespalib/util/simple_thread_bundle.h>
#include <vespa/vespalib/util/box.h>
-#include <vespa/fastos/time.h>
+#include <vespa/fastos/timestamp.h>
using namespace vespalib;
@@ -57,12 +57,11 @@ TEST("estimate cost of thread bundle fork/join") {
}
double minTime = 1000000.0;
for (size_t samples = 0; samples < 32; ++samples) {
- FastOS_Time t;
- t.SetNow();
+ fastos::StopWatch timer;
for (size_t n = 0; n < fork; ++n) {
threadBundle.run(targets);
}
- double time = t.MilliSecsToNow();
+ double time = timer.elapsed().ms();
if (time < minTime) {
minTime = time;
}