diff options
author | cbdev <cb@cbcdn.com> | 2019-12-04 01:10:12 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2019-12-04 01:10:12 +0100 |
commit | bd9ab579eba35db70ad1ce17d556aeda5866156d (patch) | |
tree | 8bac76338e63d0227bac20ad231f5fefe5f5fd62 /backends | |
parent | dcdf802e10b8199bf04139b0e63912bda2b681ce (diff) | |
download | midimonster-bd9ab579eba35db70ad1ce17d556aeda5866156d.tar.gz midimonster-bd9ab579eba35db70ad1ce17d556aeda5866156d.tar.bz2 midimonster-bd9ab579eba35db70ad1ce17d556aeda5866156d.zip |
Hide lua_interval if timerfd callback mechanism is used
Diffstat (limited to 'backends')
-rw-r--r-- | backends/lua.c | 2 | ||||
-rw-r--r-- | backends/lua.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/backends/lua.c b/backends/lua.c index 1cd965e..3555e72 100644 --- a/backends/lua.c +++ b/backends/lua.c @@ -52,6 +52,7 @@ int init(){ return 0; } +#ifndef MMBACKEND_LUA_TIMERFD static uint32_t lua_interval(){ size_t n = 0; uint64_t next_timer = 1000; @@ -66,6 +67,7 @@ static uint32_t lua_interval(){ } return 1000; } +#endif static int lua_update_timerfd(){ uint64_t interval = 0, gcd, residual; diff --git a/backends/lua.h b/backends/lua.h index 7aad891..f2583a8 100644 --- a/backends/lua.h +++ b/backends/lua.h @@ -18,7 +18,9 @@ static int lua_set(instance* inst, size_t num, channel** c, channel_value* v); static int lua_handle(size_t num, managed_fd* fds); static int lua_start(); static int lua_shutdown(); +#ifndef MMBACKEND_LUA_TIMERFD static uint32_t lua_interval(); +#endif typedef struct /*_lua_instance_data*/ { size_t channels; |