コード例 #1
0
ファイル: timer.c プロジェクト: 5paceManSpiff/luakit
static int
luaH_timer_stop(lua_State *L)
{
    ltimer_t *timer = luaH_checktimer(L, 1);
    if (timer->id == TIMER_STOPPED)
        luaH_warn(L, "timer already stopped");
    else
        luaH_timer_destroy(L, timer);
    return 0;
}
コード例 #2
0
ファイル: timer.c プロジェクト: jerojasro/luakit
static int
luaH_timer_stop(lua_State *L)
{
    ltimer_t *timer = luaH_checkudata(L, 1, &timer_class);
    if (timer->timer_id == TIMER_STOPPED) {
        luaH_warn(L, "timer already stopped. Cannot stop a timer twice");
    } else {
        luaH_timer_destroy(L, timer);
    }
    return 0;
}