diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-06-08 02:03:31 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-06-09 02:05:34 +0900 |
| commit | 99cd73c0926f0c07d27777fde2f15816e8040030 (patch) | |
| tree | 7c6a077b0590c49029c76686afb9c2ab1d00bb6d /src/DHTNode.h | |
| parent | 2874f6ab095a30a4d297cdc85fa3730bec41b1c2 (diff) | |
Replace timer facility with chrono lib
Diffstat (limited to 'src/DHTNode.h')
| -rw-r--r-- | src/DHTNode.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/DHTNode.h b/src/DHTNode.h index 1180856f..2c2b9edb 100644 --- a/src/DHTNode.h +++ b/src/DHTNode.h @@ -52,8 +52,7 @@ private: uint16_t port_; - // in milli sec - int rtt_; + std::chrono::milliseconds rtt_; int condition_; @@ -75,9 +74,9 @@ public: return id_; } - void updateRTT(int millisec) + void updateRTT(std::chrono::milliseconds t) { - rtt_ = millisec; + rtt_ = std::move(t); } const std::string& getIPAddress() const |
