aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-03-08 14:26:50 +0100
committercbdev <cb@cbcdn.com>2020-03-08 14:26:50 +0100
commit5f4b349aff49be0a5f6895631a93c47fcafcff93 (patch)
treef832e57ee48e3f2b996e5a0f1fc4a54ea857464b /backends
parent339c7eaf6f87509d500857d33a82587f5554b2b5 (diff)
downloadmidimonster-5f4b349aff49be0a5f6895631a93c47fcafcff93.tar.gz
midimonster-5f4b349aff49be0a5f6895631a93c47fcafcff93.tar.bz2
midimonster-5f4b349aff49be0a5f6895631a93c47fcafcff93.zip
Add lua debug loggingv0.4
Diffstat (limited to 'backends')
-rw-r--r--backends/lua.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/backends/lua.c b/backends/lua.c
index 9a8091e..e7ba9f9 100644
--- a/backends/lua.c
+++ b/backends/lua.c
@@ -64,6 +64,7 @@ static uint32_t lua_interval(){
next_timer = timer[n].interval - timer[n].delta;
}
}
+ DBGPF("Next timer fires in %" PRIu32, next_timer);
return next_timer;
}
return 1000;
@@ -85,6 +86,7 @@ static int lua_update_timerfd(){
interval = timer[n].interval;
}
}
+ DBGPF("Recalculating timers, minimum is %" PRIu64, interval);
//calculate gcd of all timers if any are active
if(interval){
@@ -111,11 +113,13 @@ static int lua_update_timerfd(){
}
if(interval == timer_interval){
+ DBGPF("Keeping interval at %" PRIu64, interval);
return 0;
}
#ifdef MMBACKEND_LUA_TIMERFD
- //configure the new interval
+ //configure the new interval, 0.0 disarms the timer
+ DBGPF("Reconfiguring timerfd to %" PRIu64 ".%" PRIu64, timer_config.it_interval.tv_sec, timer_config.it_interval.tv_nsec);
timerfd_settime(timer_fd, 0, &timer_config, NULL);
#endif
timer_interval = interval;