Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcda826e

Browse files
gjasnydeanberris
authored andcommitted
Make compatible with boost::chrono
(this fixes two more places that702dd54 missed)
1 parent702dd54 commitcda826e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

‎boost/network/protocol/http/client/connection/sync_normal.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ struct http_sync_connection
7777
}
7878
}
7979
if (timeout_ >0) {
80+
#if defined(BOOST_ASIO_HAS_STD_CHRONO)
8081
timer_.expires_from_now(std::chrono::seconds(timeout_));
82+
#elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
83+
timer_.expires_from_now(boost::chrono::seconds(timeout_));
84+
#else
85+
#error Need a chrono implementation
86+
#endif
8187
auto self =this->shared_from_this();
8288
timer_.async_wait([=] (boost::system::error_codeconst &ec) {
8389
self->handle_timeout(ec);

‎boost/network/protocol/http/client/connection/sync_ssl.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,13 @@ struct https_sync_connection
119119
}
120120
}
121121
if (timeout_ >0) {
122+
#if defined(BOOST_ASIO_HAS_STD_CHRONO)
122123
timer_.expires_from_now(std::chrono::seconds(timeout_));
124+
#elif defined(BOOST_ASIO_HAS_BOOST_CHRONO)
125+
timer_.expires_from_now(boost::chrono::seconds(timeout_));
126+
#else
127+
#error Need a chrono implementation
128+
#endif
123129
auto self =this->shared_from_this();
124130
timer_.async_wait(
125131
[=](boost::system::error_codeconst& ec) { self->handle_timeout(ec); });

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp