Skip to content

Commit

Permalink
shell: run loop for 100ms between loops
Browse files Browse the repository at this point in the history
  • Loading branch information
krichprollsch committed Nov 4, 2024
1 parent cbf9778 commit c971cd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shell.zig
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ pub fn shellExec(
// - user input command from repl
// - JS callbacks events from scripts
while (true) {
try loop.io.tick();
try loop.io.run_for_ns(100 * std.time.ns_per_ms); // 100ms
if (loop.cbk_error) {
if (try try_catch.exception(alloc, js_env.*)) |msg| {
defer alloc.free(msg);
Expand Down

0 comments on commit c971cd4

Please sign in to comment.