aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'backends/lua.c')
-rw-r--r--backends/lua.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/backends/lua.c b/backends/lua.c
index 127933a..e2f3b0e 100644
--- a/backends/lua.c
+++ b/backends/lua.c
@@ -533,7 +533,8 @@ static int lua_set(instance* inst, size_t num, channel** c, channel_value* v){
}
static int lua_handle(size_t num, managed_fd* fds){
- uint64_t delta = timer_interval;
+ uint64_t delta = mm_timestamp() - last_timestamp;
+ last_timestamp = mm_timestamp();
size_t n;
#ifdef MMBACKEND_LUA_TIMERFD
@@ -547,9 +548,6 @@ static int lua_handle(size_t num, managed_fd* fds){
LOGPF("Failed to read timer: %s", strerror(errno));
return 1;
}
- #else
- delta = mm_timestamp() - last_timestamp;
- last_timestamp = mm_timestamp();
#endif
//no timers active