Skip to content

Commit 4580871

Browse files
committed
replace tick() usages with run_for_ns
1 parent f434b3c commit 4580871

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/loop.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub const SingleThreaded = struct {
6666
// on the go when they are executed (ie. nested I/O events).
6767
pub fn run(self: *Self) !void {
6868
while (self.eventsNb() > 0) {
69-
try self.io.tick();
69+
try self.io.run_for_ns(10 * std.time.ns_per_ms);
7070
// at each iteration we might have new events registred by previous callbacks
7171
}
7272
// TODO: return instead immediatly on the first JS callback error

src/shell.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ pub fn shellExec(
224224
// - user input command from repl
225225
// - JS callbacks events from scripts
226226
while (true) {
227-
try loop.io.tick();
227+
try loop.io.run_for_ns(10 * std.time.ns_per_ms);
228228
if (loop.cbk_error) {
229229
if (try try_catch.exception(alloc, js_env.*)) |msg| {
230230
defer alloc.free(msg);

0 commit comments

Comments
 (0)