use chrono
diff --git a/test/cpp/src/StressTest.cpp b/test/cpp/src/StressTest.cpp
index f4c281c..930261e 100644
--- a/test/cpp/src/StressTest.cpp
+++ b/test/cpp/src/StressTest.cpp
@@ -20,7 +20,6 @@
#include <thrift/concurrency/ThreadManager.h>
#include <thrift/concurrency/ThreadFactory.h>
#include <thrift/concurrency/Monitor.h>
-#include <thrift/concurrency/Util.h>
#include <thrift/concurrency/Mutex.h>
#include <thrift/protocol/TBinaryProtocol.h>
#include <thrift/server/TSimpleServer.h>
@@ -133,7 +132,7 @@
}
}
- _startTime = Util::currentTime();
+ _startTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();
if(_behavior == OpenAndCloseTransportInThread) {
_transport->open();
}
@@ -159,7 +158,7 @@
break;
}
- _endTime = Util::currentTime();
+ _endTime = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();
if(_behavior == OpenAndCloseTransportInThread) {
_transport->close();
@@ -540,7 +539,7 @@
cerr << "Launch " << clientCount << " " << clientType << " client threads" << endl;
- time00 = Util::currentTime();
+ time00 = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();
monitor.notifyAll();
@@ -548,7 +547,7 @@
monitor.wait();
}
- time01 = Util::currentTime();
+ time01 = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count();
}
int64_t firstTime = 9223372036854775807LL;