diff --git a/core/timermanager.cpp b/core/timermanager.cpp index c2472e5..04c351a 100644 --- a/core/timermanager.cpp +++ b/core/timermanager.cpp @@ -110,9 +110,10 @@ void TimerManager::cancel_timer(uint32_t id) } } -uint64_t TimerManager::process_timers(uint64_t time_now) +uint64_t TimerManager::process_timers() { TimerInfo* cur_timer; + uint64_t time_now = get_time_now(); if (this->timer_queue.empty()) { return 0ULL; diff --git a/core/timermanager.h b/core/timermanager.h index c1a9e8e..593642f 100644 --- a/core/timermanager.h +++ b/core/timermanager.h @@ -106,7 +106,7 @@ public: uint32_t add_cyclic_timer(uint64_t interval, uint64_t delay, timer_cb cb); void cancel_timer(uint32_t id); - uint64_t process_timers(uint64_t time_now); + uint64_t process_timers(); private: static TimerManager* timer_manager; diff --git a/cpu/ppc/ppcexec.cpp b/cpu/ppc/ppcexec.cpp index 770954a..08e1f76 100644 --- a/cpu/ppc/ppcexec.cpp +++ b/cpu/ppc/ppcexec.cpp @@ -302,7 +302,7 @@ uint64_t get_virt_time_ns() uint64_t process_events() { - uint64_t slice_ns = TimerManager::get_instance()->process_timers(get_virt_time_ns()); + uint64_t slice_ns = TimerManager::get_instance()->process_timers(); if (slice_ns == 0) { // execute 10.000 cycles // if there are no pending timers