File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ static uint32_t lua_interval(){
6464 next_timer = timer [n ].interval - timer [n ].delta ;
6565 }
6666 }
67+ DBGPF ("Next timer fires in %" PRIu32 , next_timer );
6768 return next_timer ;
6869 }
6970 return 1000 ;
@@ -85,6 +86,7 @@ static int lua_update_timerfd(){
8586 interval = timer [n ].interval ;
8687 }
8788 }
89+ DBGPF ("Recalculating timers, minimum is %" PRIu64 , interval );
8890
8991 //calculate gcd of all timers if any are active
9092 if (interval ){
@@ -111,11 +113,13 @@ static int lua_update_timerfd(){
111113 }
112114
113115 if (interval == timer_interval ){
116+ DBGPF ("Keeping interval at %" PRIu64 , interval );
114117 return 0 ;
115118 }
116119
117120 #ifdef MMBACKEND_LUA_TIMERFD
118- //configure the new interval
121+ //configure the new interval, 0.0 disarms the timer
122+ DBGPF ("Reconfiguring timerfd to %" PRIu64 ".%" PRIu64 , timer_config .it_interval .tv_sec , timer_config .it_interval .tv_nsec );
119123 timerfd_settime (timer_fd , 0 , & timer_config , NULL );
120124 #endif
121125 timer_interval = interval ;
You can’t perform that action at this time.
0 commit comments