diff --git a/app/modules/tmr.c b/app/modules/tmr.c index 1a0fa478..adbe3a7b 100644 --- a/app/modules/tmr.c +++ b/app/modules/tmr.c @@ -71,15 +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 ); + + os_delay_us( us ); return 0; }