Skip to content

Commit

Permalink
lj_vmprofile.c: Fix bug where restarting the timer would not work
Browse files Browse the repository at this point in the history
  • Loading branch information
lukego committed Jan 17, 2018
1 parent fd0e49d commit e92c500
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/lj_vmprofile.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,12 @@ void vmprofile_start(lua_State *L)
}
}

void vmprofile_stop()
{
stop_timer();
started = 0;
}

/* -- Lua API ------------------------------------------------------------- */

LUA_API int luaJIT_vmprofile_open(lua_State *L, const char *str, int noselect, int nostart)
Expand Down Expand Up @@ -181,7 +187,7 @@ LUA_API int luaJIT_vmprofile_start(lua_State *L)

LUA_API int luaJIT_vmprofile_stop(lua_State *L)
{
stop_timer();
vmprofile_stop();
return 0;
}

0 comments on commit e92c500

Please sign in to comment.