Skip to content
Snippets Groups Projects
Commit 4133ed7e authored by Fredrik Bagge Carlson's avatar Fredrik Bagge Carlson
Browse files

Use Lib.systemsleep in control loop

parent b2f44909
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -23,7 +23,7 @@ macro periodically(h, simulation, body)
local start_time = time()
$(esc(body))
local execution_time = time()-start_time
$(esc(simulation)) || sleep(max(0,$(esc(h))-execution_time))
$(esc(simulation)) || Libc.systemsleep(max(0,$(esc(h))-execution_time))
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment