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/DownloadEngineFactory.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/DownloadEngineFactory.cc') diff --git a/src/DownloadEngineFactory.cc b/src/DownloadEngineFactory.cc index fa350589..fe87507c 100644 --- a/src/DownloadEngineFactory.cc +++ b/src/DownloadEngineFactory.cc @@ -166,22 +166,22 @@ DownloadEngineFactory::newDownloadEngine e.get())); if(op->getAsInt(PREF_AUTO_SAVE_INTERVAL) > 0) { - e->addRoutineCommand - (make_unique(e->newCUID(), e.get(), - op->getAsInt(PREF_AUTO_SAVE_INTERVAL))); + e->addRoutineCommand(make_unique( + e->newCUID(), e.get(), + std::chrono::seconds(op->getAsInt(PREF_AUTO_SAVE_INTERVAL)))); } if(op->getAsInt(PREF_SAVE_SESSION_INTERVAL) > 0) { - e->addRoutineCommand(make_unique - (e->newCUID(), e.get(), - op->getAsInt(PREF_SAVE_SESSION_INTERVAL))); + e->addRoutineCommand(make_unique( + e->newCUID(), e.get(), + std::chrono::seconds(op->getAsInt(PREF_SAVE_SESSION_INTERVAL)))); } e->addRoutineCommand(make_unique - (e->newCUID(), e.get(), 10)); + (e->newCUID(), e.get(), std::chrono::seconds(10))); { - time_t stopSec = op->getAsInt(PREF_STOP); + auto stopSec = op->getAsInt(PREF_STOP); if(stopSec > 0) { - e->addRoutineCommand(make_unique(e->newCUID(), e.get(), - stopSec)); + e->addRoutineCommand(make_unique( + e->newCUID(), e.get(), std::chrono::seconds(stopSec))); } } if(op->defined(PREF_STOP_WITH_PROCESS)) { -- cgit