diff options
author | James M Snell <jasnell@gmail.com> | 2018-04-11 13:59:26 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-04-12 12:30:36 -0700 |
commit | 039cdebe81e232cae23acdfd8392a8149b718460 (patch) | |
tree | 5fdeaa6ace6cfe7f1097b92a91f845344418cb40 /src/node_http2.cc | |
parent | 93967d00e9feb944b1ec907dabaaf32f243e5806 (diff) | |
download | android-node-v8-039cdebe81e232cae23acdfd8392a8149b718460.tar.gz android-node-v8-039cdebe81e232cae23acdfd8392a8149b718460.tar.bz2 android-node-v8-039cdebe81e232cae23acdfd8392a8149b718460.zip |
http2: fix ping duration calculation
PR-URL: https://github.com/nodejs/node/pull/19956
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'src/node_http2.cc')
-rw-r--r-- | src/node_http2.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_http2.cc b/src/node_http2.cc index a76943a10b..6c4b812e03 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -2617,8 +2617,8 @@ void Http2Session::Http2Ping::Send(uint8_t* payload) { } void Http2Session::Http2Ping::Done(bool ack, const uint8_t* payload) { - session_->statistics_.ping_rtt = (uv_hrtime() - startTime_); - double duration = (session_->statistics_.ping_rtt - startTime_) / 1e6; + session_->statistics_.ping_rtt = uv_hrtime() - startTime_; + double duration = session_->statistics_.ping_rtt / 1e6; Local<Value> buf = Undefined(env()->isolate()); if (payload != nullptr) { |