From 5b022cca323f4874cbca03cdff7205be34409f01 Mon Sep 17 00:00:00 2001 From: sandro010 <159458129+sandro010@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:44:01 -0400 Subject: [PATCH] rename to correct name functions in sleep lib example --- src/09_sleep_lib.c | 4 ++-- src/test_sleep.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/09_sleep_lib.c b/src/09_sleep_lib.c index 9c2d938..82285d6 100644 --- a/src/09_sleep_lib.c +++ b/src/09_sleep_lib.c @@ -21,6 +21,6 @@ static int u_sleep(lua_State *L) int luaopen_msleep(lua_State *L) { lua_register(L, "sleep", s_sleep); - lua_register(L, "msleep", m_sleep); + lua_register(L, "msleep", u_sleep); return 0; -} \ No newline at end of file +} diff --git a/src/test_sleep.lua b/src/test_sleep.lua index da839c7..db06c64 100644 --- a/src/test_sleep.lua +++ b/src/test_sleep.lua @@ -14,5 +14,5 @@ local end_time = os.time() print(string.format("After sleep(1), time is %d", end_time)) print(string.format("First interval = %d seconds", mid_time - start_time)) -pritn(string.format("Second interval = %d seconds", end_time - mid_time)) -print(string.format("Whole interval = %d seconds", end_time - start_time)) \ No newline at end of file +print(string.format("Second interval = %d seconds", end_time - mid_time)) +print(string.format("Whole interval = %d seconds", end_time - start_time))