Skip to content

Commit

Permalink
Use steady_timer replace old deadlime_timer, remove date_time library…
Browse files Browse the repository at this point in the history
… dependency on windows platform
  • Loading branch information
HungMingWu committed Feb 4, 2018
1 parent 37ba8f1 commit ffba038
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ else ()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -std=c++17")
endif ()

find_package(Boost 1.60 REQUIRED COMPONENTS system date_time)
find_package(Boost 1.60 REQUIRED COMPONENTS system)

set(CINATRA
http_server.hpp
Expand Down
4 changes: 2 additions & 2 deletions connection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace cinatra {
}

void reset_timer() {
timer_.expires_from_now(boost::posix_time::seconds(KEEP_ALIVE_TIMEOUT_));
timer_.expires_from_now(std::chrono::seconds(KEEP_ALIVE_TIMEOUT_));
auto self = this->shared_from_this();

timer_.async_wait([self](boost::system::error_code const& ec) {
Expand Down Expand Up @@ -821,7 +821,7 @@ namespace cinatra {
//-----------------send message----------------//

socket_type socket_;
boost::asio::deadline_timer timer_;
boost::asio::steady_timer timer_;
request req_;
response res_;
websocket ws_;
Expand Down

0 comments on commit ffba038

Please sign in to comment.