diff options
author | Benety Goh <benety@mongodb.com> | 2015-08-10 17:21:52 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2015-08-11 10:24:50 -0400 |
commit | 0f885432ed34bbcb0a4bc425b6044f8451d6d1cf (patch) | |
tree | d034326afa8949f3ab21e6b5bcb4bfce0fbf7d52 /src/mongo/client/connection_pool.cpp | |
parent | 67b5319f3f7c028f2a629b8aaa77b6da33707adb (diff) | |
download | mongo-0f885432ed34bbcb0a4bc425b6044f8451d6d1cf.tar.gz |
SERVER-19861 converted uses of std::chrono::duration::count() to mongo::durationCount()
Diffstat (limited to 'src/mongo/client/connection_pool.cpp')
-rw-r--r-- | src/mongo/client/connection_pool.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/client/connection_pool.cpp b/src/mongo/client/connection_pool.cpp index d9c888ef37e..df321a76b30 100644 --- a/src/mongo/client/connection_pool.cpp +++ b/src/mongo/client/connection_pool.cpp @@ -149,9 +149,9 @@ ConnectionPool::ConnectionList::iterator ConnectionPool::acquireConnection( try { if (candidate->conn->isStillConnected()) { // setSoTimeout takes a double representing the number of seconds for send and - // receive timeouts. Thus, we must take count() and divide by + // receive timeouts. Thus, we must express 'timeout' in milliseconds and divide by // 1000.0 to get the number of seconds with a fractional part. - candidate->conn->setSoTimeout(timeout.count() / 1000.0); + candidate->conn->setSoTimeout(durationCount<Milliseconds>(timeout) / 1000.0); return candidate; } } catch (...) { @@ -170,9 +170,9 @@ ConnectionPool::ConnectionList::iterator ConnectionPool::acquireConnection( std::unique_ptr<DBClientConnection> conn(new DBClientConnection()); // setSoTimeout takes a double representing the number of seconds for send and receive - // timeouts. Thus, we must take count() and divide by 1000.0 to get the number - // of seconds with a fractional part. - conn->setSoTimeout(timeout.count() / 1000.0); + // timeouts. Thus, we must express 'timeout' in milliseconds and divide by 1000.0 to get the + // number of seconds with a fractional part. + conn->setSoTimeout(durationCount<Milliseconds>(timeout) / 1000.0); if (_hook) { uassertStatusOK( |