Skip to content

Commit 83543a2

Browse files
committed
waitIDE() with timeout (ms)
1 parent e901932 commit 83543a2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

emmy_core/emmy_core.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,12 @@ int breakHere(lua_State* L) {
7777
return 1;
7878
}
7979

80-
// emmy.waitIDE(): void
80+
// emmy.waitIDE(timeout: number): void
8181
int waitIDE(lua_State* L) {
82-
EmmyFacade::Get()->WaitIDE();
82+
int top = lua_gettop(L);
83+
int timeout = 0;
84+
if (top >= 1) timeout = luaL_checknumber(L, 1);
85+
EmmyFacade::Get()->WaitIDE(false, timeout);
8386
return 0;
8487
}
8588

0 commit comments

Comments
 (0)