summaryrefslogtreecommitdiffstats
path: root/messagebus/src
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-11-19 14:11:56 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-11-20 10:16:58 +0000
commitd328b6ce8389fb12c76d813476fff925c452c1cb (patch)
treec821335240b016ba13413e13b3ba5dd0e31d6ac8 /messagebus/src
parent2ee1d3ee47906e67ea49f1fa3f8d8896d3869f48 (diff)
SystemTimer -> SteadyTimer
Diffstat (limited to 'messagebus/src')
-rw-r--r--messagebus/src/vespa/messagebus/CMakeLists.txt2
-rw-r--r--messagebus/src/vespa/messagebus/dynamicthrottlepolicy.cpp6
-rw-r--r--messagebus/src/vespa/messagebus/network/rpctargetpool.cpp4
-rw-r--r--messagebus/src/vespa/messagebus/steadytimer.cpp (renamed from messagebus/src/vespa/messagebus/systemtimer.cpp)5
-rw-r--r--messagebus/src/vespa/messagebus/steadytimer.h (renamed from messagebus/src/vespa/messagebus/systemtimer.h)2
5 files changed, 10 insertions, 9 deletions
diff --git a/messagebus/src/vespa/messagebus/CMakeLists.txt b/messagebus/src/vespa/messagebus/CMakeLists.txt
index 9ff3bae67c8..4dcc059ce81 100644
--- a/messagebus/src/vespa/messagebus/CMakeLists.txt
+++ b/messagebus/src/vespa/messagebus/CMakeLists.txt
@@ -30,7 +30,7 @@ vespa_add_library(messagebus
sourcesession.cpp
sourcesessionparams.cpp
staticthrottlepolicy.cpp
- systemtimer.cpp
+ steadytimer.cpp
$<TARGET_OBJECTS:messagebus_routing>
$<TARGET_OBJECTS:messagebus_network>
INSTALL lib64
diff --git a/messagebus/src/vespa/messagebus/dynamicthrottlepolicy.cpp b/messagebus/src/vespa/messagebus/dynamicthrottlepolicy.cpp
index 55720f7d6ca..7145e0ec36d 100644
--- a/messagebus/src/vespa/messagebus/dynamicthrottlepolicy.cpp
+++ b/messagebus/src/vespa/messagebus/dynamicthrottlepolicy.cpp
@@ -1,6 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "dynamicthrottlepolicy.h"
-#include "systemtimer.h"
+#include "steadytimer.h"
#include <climits>
#include <vespa/log/log.h>
@@ -9,7 +9,7 @@ LOG_SETUP(".dynamicthrottlepolicy");
namespace mbus {
DynamicThrottlePolicy::DynamicThrottlePolicy() :
- _timer(new SystemTimer()),
+ _timer(new SteadyTimer()),
_numSent(0),
_numOk(0),
_resizeRate(3),
@@ -27,7 +27,7 @@ DynamicThrottlePolicy::DynamicThrottlePolicy() :
{ }
DynamicThrottlePolicy::DynamicThrottlePolicy(double windowSizeIncrement) :
- _timer(new SystemTimer()),
+ _timer(new SteadyTimer()),
_numSent(0),
_numOk(0),
_resizeRate(3),
diff --git a/messagebus/src/vespa/messagebus/network/rpctargetpool.cpp b/messagebus/src/vespa/messagebus/network/rpctargetpool.cpp
index 6dca636cad2..7fcc214faa7 100644
--- a/messagebus/src/vespa/messagebus/network/rpctargetpool.cpp
+++ b/messagebus/src/vespa/messagebus/network/rpctargetpool.cpp
@@ -1,6 +1,6 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "rpctargetpool.h"
-#include <vespa/messagebus/systemtimer.h>
+#include <vespa/messagebus/steadytimer.h>
namespace mbus {
@@ -12,7 +12,7 @@ RPCTargetPool::Entry::Entry(RPCTarget::SP target, uint64_t lastUse) :
RPCTargetPool::RPCTargetPool(double expireSecs) :
_lock(),
_targets(),
- _timer(new SystemTimer()),
+ _timer(new SteadyTimer()),
_expireMillis(static_cast<uint64_t>(expireSecs * 1000))
{ }
diff --git a/messagebus/src/vespa/messagebus/systemtimer.cpp b/messagebus/src/vespa/messagebus/steadytimer.cpp
index 0570d81ce68..f64c8f361cd 100644
--- a/messagebus/src/vespa/messagebus/systemtimer.cpp
+++ b/messagebus/src/vespa/messagebus/steadytimer.cpp
@@ -1,12 +1,13 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include "systemtimer.h"
+#include "steadytimer.h"
#include <chrono>
using namespace std::chrono;
+
namespace mbus {
uint64_t
-SystemTimer::getMilliTime() const
+SteadyTimer::getMilliTime() const
{
return duration_cast<milliseconds>(steady_clock::now().time_since_epoch()).count();
}
diff --git a/messagebus/src/vespa/messagebus/systemtimer.h b/messagebus/src/vespa/messagebus/steadytimer.h
index aff3dc87e75..12a175368ac 100644
--- a/messagebus/src/vespa/messagebus/systemtimer.h
+++ b/messagebus/src/vespa/messagebus/steadytimer.h
@@ -10,7 +10,7 @@ namespace mbus {
* constructs in message bus use by default. The only reason for replacing this
* is for writing unit tests.
*/
-class SystemTimer : public ITimer {
+class SteadyTimer : public ITimer {
public:
uint64_t getMilliTime() const override;
};