fix warings
diff --git a/lib/cpp/test/concurrency/TimerManagerTests.h b/lib/cpp/test/concurrency/TimerManagerTests.h
index 24d829a..a922826 100644
--- a/lib/cpp/test/concurrency/TimerManagerTests.h
+++ b/lib/cpp/test/concurrency/TimerManagerTests.h
@@ -36,7 +36,7 @@
public:
class Task : public Runnable {
public:
- Task(Monitor& monitor, int64_t timeout)
+ Task(Monitor& monitor, uint64_t timeout)
: _timeout(timeout),
_startTime(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count()),
_endTime(0),
@@ -72,7 +72,7 @@
* properly clean up itself and the remaining orphaned timeout task when the
* manager goes out of scope and its destructor is called.
*/
- bool test00(int64_t timeout = 1000LL) {
+ bool test00(uint64_t timeout = 1000LL) {
shared_ptr<TimerManagerTests::Task> orphanTask
= shared_ptr<TimerManagerTests::Task>(new TimerManagerTests::Task(_monitor, 10 * timeout));
@@ -94,7 +94,7 @@
Synchronized s(_monitor);
timerManager.add(orphanTask, 10 * timeout);
- THRIFT_SLEEP_USEC(timeout * 1000);
+ std::this_thread::sleep_for(std::chrono::milliseconds(timeout));
task.reset(new TimerManagerTests::Task(_monitor, timeout));
timerManager.add(task, timeout);
@@ -122,7 +122,7 @@
* verifies that the timer manager properly clean up itself and the remaining orphaned timeout
* task when the manager goes out of scope and its destructor is called.
*/
- bool test01(int64_t timeout = 1000LL) {
+ bool test01(uint64_t timeout = 1000LL) {
TimerManager timerManager;
timerManager.threadFactory(shared_ptr<ThreadFactory>(new ThreadFactory()));
timerManager.start();
@@ -155,7 +155,7 @@
* clean up itself and the remaining orphaned timeout task when the manager goes out of scope
* and its destructor is called.
*/
- bool test02(int64_t timeout = 1000LL) {
+ bool test02(uint64_t timeout = 1000LL) {
TimerManager timerManager;
timerManager.threadFactory(shared_ptr<ThreadFactory>(new ThreadFactory()));
timerManager.start();
@@ -188,7 +188,7 @@
* verifies that the timer manager properly clean up itself and the remaining orphaned timeout
* task when the manager goes out of scope and its destructor is called.
*/
- bool test03(int64_t timeout = 1000LL) {
+ bool test03(uint64_t timeout = 1000LL) {
TimerManager timerManager;
timerManager.threadFactory(shared_ptr<ThreadFactory>(new ThreadFactory()));
timerManager.start();
@@ -225,7 +225,7 @@
/**
* This test creates one tasks, and tries to remove it after it has expired.
*/
- bool test04(int64_t timeout = 1000LL) {
+ bool test04(uint64_t timeout = 1000LL) {
TimerManager timerManager;
timerManager.threadFactory(shared_ptr<ThreadFactory>(new ThreadFactory()));
timerManager.start();