summaryrefslogtreecommitdiff
path: root/src/FileAllocationCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-06-08 02:03:31 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-06-09 02:05:34 +0900
commit99cd73c0926f0c07d27777fde2f15816e8040030 (patch)
tree7c6a077b0590c49029c76686afb9c2ab1d00bb6d /src/FileAllocationCommand.cc
parent2874f6ab095a30a4d297cdc85fa3730bec41b1c2 (diff)
Replace timer facility with chrono lib
Diffstat (limited to 'src/FileAllocationCommand.cc')
-rw-r--r--src/FileAllocationCommand.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/FileAllocationCommand.cc b/src/FileAllocationCommand.cc
index a36f44cf..d15b3389 100644
--- a/src/FileAllocationCommand.cc
+++ b/src/FileAllocationCommand.cc
@@ -71,10 +71,11 @@ bool FileAllocationCommand::executeInternal()
}
fileAllocationEntry_->allocateChunk();
if(fileAllocationEntry_->finished()) {
- A2_LOG_DEBUG
- (fmt(MSG_ALLOCATION_COMPLETED,
- static_cast<long int>(timer_.difference(global::wallclock())),
- getRequestGroup()->getTotalLength()));
+ A2_LOG_DEBUG(fmt(MSG_ALLOCATION_COMPLETED,
+ static_cast<long int>(
+ std::chrono::duration_cast<std::chrono::seconds>(
+ timer_.difference(global::wallclock())).count()),
+ getRequestGroup()->getTotalLength()));
std::vector<std::unique_ptr<Command>> commands;
fileAllocationEntry_->prepareForNextAction(commands, getDownloadEngine());
getDownloadEngine()->addCommand(std::move(commands));