From 99cd73c0926f0c07d27777fde2f15816e8040030 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Mon, 8 Jun 2015 02:03:31 +0900 Subject: Replace timer facility with chrono lib --- src/HttpServerBodyCommand.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/HttpServerBodyCommand.cc') diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc index 8f5cac16..7fb715c2 100644 --- a/src/HttpServerBodyCommand.cc +++ b/src/HttpServerBodyCommand.cc @@ -148,8 +148,8 @@ void HttpServerBodyCommand::addHttpServerResponseCommand(bool delayed) auto resp = make_unique(getCuid(), httpServer_, e_, socket_); if (delayed) { - e_->addCommand( - make_unique(getCuid(), e_, 1, std::move(resp), true)); + e_->addCommand(make_unique( + getCuid(), e_, std::chrono::seconds(1), std::move(resp), true)); return; } @@ -320,7 +320,8 @@ bool HttpServerBodyCommand::execute() return false; } } else { - if(timeoutTimer_.difference(global::wallclock()) >= 30) { + if(timeoutTimer_.difference(global::wallclock()) >= + std::chrono::seconds(30)) { A2_LOG_INFO("HTTP request body timeout."); return true; } else { -- cgit