From b958eaab4c1611c749e837af43566bc7d274fbcd Mon Sep 17 00:00:00 2001 From: Pierre De Lancre Date: Sat, 5 Sep 2026 11:43:30 +0300 Subject: [PATCH] typing: refresh every 2s --- src/matrix_harness.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/matrix_harness.zig b/src/matrix_harness.zig index 3b7e44f..2f05c75 100644 --- a/src/matrix_harness.zig +++ b/src/matrix_harness.zig @@ -164,10 +164,10 @@ fn typingKeepalive() void { const io = typing_io orelse return; const pa = std.heap.page_allocator; while (turn_busy.load(.acquire)) { - matrix.setTyping(pa, io, typing_token, typing_uid, typing_room, true, 60000); + matrix.setTyping(pa, io, typing_token, typing_uid, typing_room, true, 10000); var slept: u32 = 0; - while (slept < 45_000 and turn_busy.load(.acquire)) : (slept += 500) { - io.sleep(.{ .nanoseconds = 500 * std.time.ns_per_ms }, .real) catch {}; + while (slept < 2_000 and turn_busy.load(.acquire)) : (slept += 250) { + io.sleep(.{ .nanoseconds = 250 * std.time.ns_per_ms }, .real) catch {}; } } matrix.setTyping(pa, io, typing_token, typing_uid, typing_room, false, 0);