Browse Source

Merge pull request #1137 from lorinlee/timer

timer_thread: remove redundant code
jamesge 4 years ago
parent
commit
e5bd064b3a
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/bthread/timer_thread.cpp

+ 1 - 3
src/bthread/timer_thread.cpp

@@ -406,9 +406,7 @@ void TimerThread::run() {
 
         // The realtime to wait for.
         int64_t next_run_time = std::numeric_limits<int64_t>::max();
-        if (tasks.empty()) {
-            next_run_time = std::numeric_limits<int64_t>::max();
-        } else {
+        if (!tasks.empty()) {
             next_run_time = tasks[0]->run_time;
         }
         // Similarly with the situation before running tasks, we check