Commit 0144ddc7 authored by LorinLee's avatar LorinLee

timer_thread: remove redundant code

parent 83635bfd
...@@ -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