Skip to content

Commit

Permalink
Merge pull request #3 from HungMingWu/master
Browse files Browse the repository at this point in the history
Use steady_timer replace old deadlime_timer, remove date_time library  dependency on windows platform
  • Loading branch information
qicosmos authored Feb 4, 2018
2 parents 37ba8f1 + ffba038 commit 1eef1dc
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 1eef1dc

Please sign in to comment.