mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 06:27:45 +00:00
cleanup boost::posix_time
This commit is contained in:
parent
7292dc3695
commit
6885a243f3
3 changed files with 3 additions and 3 deletions
|
@ -192,7 +192,7 @@ namespace SimpleWeb {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
auto timer=std::make_shared<asio::deadline_timer>(io_service);
|
auto timer=std::make_shared<asio::deadline_timer>(io_service);
|
||||||
timer->expires_from_now(boost::posix_time::seconds(config.timeout));
|
timer->expires_from_now( std::chrono::seconds( config.timeout ) );
|
||||||
timer->async_wait([this](const std::error_code& ec) {
|
timer->async_wait([this](const std::error_code& ec) {
|
||||||
if(!ec) {
|
if(!ec) {
|
||||||
close();
|
close();
|
||||||
|
|
|
@ -225,7 +225,7 @@ namespace SimpleWeb {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
auto timer=std::make_shared<asio::deadline_timer>(*io_service);
|
auto timer=std::make_shared<asio::deadline_timer>(*io_service);
|
||||||
timer->expires_from_now(boost::posix_time::seconds(seconds));
|
timer->expires_from_now( std::chrono::seconds( seconds ) );
|
||||||
timer->async_wait([socket](const std::error_code& ec){
|
timer->async_wait([socket](const std::error_code& ec){
|
||||||
if(!ec) {
|
if(!ec) {
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
|
|
|
@ -209,7 +209,7 @@ namespace SimpleWeb {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
auto timer = std::make_shared< asio::deadline_timer >( io_service );
|
auto timer = std::make_shared< asio::deadline_timer >( io_service );
|
||||||
timer->expires_from_now( boost::posix_time::seconds( config.timeout ) );
|
timer->expires_from_now( std::chrono::seconds( config.timeout ) );
|
||||||
timer->async_wait( [this]( const std::error_code& ec ) {
|
timer->async_wait( [this]( const std::error_code& ec ) {
|
||||||
if( !ec ) {
|
if( !ec ) {
|
||||||
close();
|
close();
|
||||||
|
|
Loading…
Add table
Reference in a new issue