Skip to content

Commit

Permalink
refactor: renamed millis to milliseconds in sleep function
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasgeiler committed Apr 17, 2024
1 parent 1744914 commit 9d691b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ API:
fenster.open(width: integer, height: integer, title: string?, scale: integer?, targetfps: number?): userdata
fenster.sleep(millis: integer)
fenster.sleep(milliseconds: integer)
fenster.time(): integer
Expand Down
2 changes: 1 addition & 1 deletion spec/fenster_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ describe('fenster', function()
assert.has_errors(function() fenster.sleep() end)
end)

it('should throw when millis is not an integer', function()
it('should throw when milliseconds is not an integer', function()
assert.has_errors(function() fenster.sleep('ERROR') end)
assert.has_errors(function() fenster.sleep(true) end)
assert.has_errors(function() fenster.sleep({}) end)
Expand Down
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ static int lfenster_open(lua_State *L) {
* @return Number of return values on the Lua stack
*/
static int lfenster_sleep(lua_State *L) {
const lua_Integer millis = luaL_checkinteger(L, 1);
const lua_Integer milliseconds = luaL_checkinteger(L, 1);

fenster_sleep(millis);
fenster_sleep(milliseconds);

return 0;
}
Expand Down

0 comments on commit 9d691b1

Please sign in to comment.