diff --git a/app/modules/tmr.c b/app/modules/tmr.c index 1a0fa478..3cefb824 100644 --- a/app/modules/tmr.c +++ b/app/modules/tmr.c @@ -71,16 +71,8 @@ static int tmr_delay( lua_State* L ) us = luaL_checkinteger( L, 1 ); if ( us <= 0 ) return luaL_error( L, "wrong arg range" ); - unsigned sec = (unsigned)us / 1000000; - unsigned remain = (unsigned)us % 1000000; - int i = 0; - for(i=0;i0) - os_delay_us( remain ); - return 0; + os_delay_us( us ); + return 0; } // Lua: now() , return system timer in us