summaryrefslogtreecommitdiff
path: root/src/HttpServerBodyCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-06-21 15:17:00 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-06-21 15:30:02 +0900
commit0b48bb1dbd048c7e5232f457a52838155c085d60 (patch)
tree44a9cdb109623923501ac190b0ac5f47839f2fe0 /src/HttpServerBodyCommand.cc
parentdd277b33af2a5a58c39142097c3ede5df7f5655d (diff)
Use user-defined literals for time units
Diffstat (limited to 'src/HttpServerBodyCommand.cc')
-rw-r--r--src/HttpServerBodyCommand.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc
index 7fb715c2..dea078a5 100644
--- a/src/HttpServerBodyCommand.cc
+++ b/src/HttpServerBodyCommand.cc
@@ -149,7 +149,7 @@ void HttpServerBodyCommand::addHttpServerResponseCommand(bool delayed)
make_unique<HttpServerResponseCommand>(getCuid(), httpServer_, e_, socket_);
if (delayed) {
e_->addCommand(make_unique<DelayedCommand>(
- getCuid(), e_, std::chrono::seconds(1), std::move(resp), true));
+ getCuid(), e_, 1_s, std::move(resp), true));
return;
}
@@ -320,8 +320,7 @@ bool HttpServerBodyCommand::execute()
return false;
}
} else {
- if(timeoutTimer_.difference(global::wallclock()) >=
- std::chrono::seconds(30)) {
+ if(timeoutTimer_.difference(global::wallclock()) >= 30_s) {
A2_LOG_INFO("HTTP request body timeout.");
return true;
} else {