Unverified Commit e5bd064b authored by jamesge's avatar jamesge Committed by GitHub

Merge pull request #1137 from lorinlee/timer

timer_thread: remove redundant code
parents 83635bfd 0144ddc7
...@@ -406,9 +406,7 @@ void TimerThread::run() { ...@@ -406,9 +406,7 @@ void TimerThread::run() {
// The realtime to wait for. // The realtime to wait for.
int64_t next_run_time = std::numeric_limits<int64_t>::max(); int64_t next_run_time = std::numeric_limits<int64_t>::max();
if (tasks.empty()) { if (!tasks.empty()) {
next_run_time = std::numeric_limits<int64_t>::max();
} else {
next_run_time = tasks[0]->run_time; next_run_time = tasks[0]->run_time;
} }
// Similarly with the situation before running tasks, we check // Similarly with the situation before running tasks, we check
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment