Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use steady_timer replace old deadlime_timer, remove date_time library dependency on windows platform #3

Merged
merged 1 commit into from
Feb 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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