aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/node/ext
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-04 17:32:28 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-04 17:32:28 -0800
commit2ea1074bd9ef3de150a4e0f03bdeb58111eef634 (patch)
tree724b83366a22936765001f641d2c25e5b7efdbfc /src/node/ext
parent24fc2c4c5ddc56a678f17170ac4eec4ec570c780 (diff)
parent53476f1d0e52dfa21fa5363fe29396e96748ab14 (diff)
Merge github.com:google/grpc into async-api-new
Diffstat (limited to 'src/node/ext')
-rw-r--r--src/node/ext/timeval.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/node/ext/timeval.cc b/src/node/ext/timeval.cc
index 687e33576b..20d52f0963 100644
--- a/src/node/ext/timeval.cc
+++ b/src/node/ext/timeval.cc
@@ -56,9 +56,8 @@ double TimespecToMilliseconds(gpr_timespec timespec) {
} else if (gpr_time_cmp(timespec, gpr_inf_past) == 0) {
return -std::numeric_limits<double>::infinity();
} else {
- struct timeval time = gpr_timeval_from_timespec(timespec);
- return (static_cast<double>(time.tv_sec) * 1000 +
- static_cast<double>(time.tv_usec) / 1000);
+ return (static_cast<double>(timespec.tv_sec) * 1000 +
+ static_cast<double>(timespec.tv_nsec) / 1000000);
}
}