termio: excessive cursor reset

This commit is contained in:
Mitchell Hashimoto
2024-07-14 15:13:41 -07:00
parent 6b0b840a81
commit 89d407dd6a

View File

@ -491,7 +491,7 @@ fn processOutputLocked(self: *Termio, buf: []const u8) void {
// use a timer under the covers
if (std.time.Instant.now()) |now| cursor_reset: {
if (self.last_cursor_reset) |last| {
if (now.since(last) <= (500 / std.time.ns_per_ms)) {
if (now.since(last) <= (500 * std.time.ns_per_ms)) {
break :cursor_reset;
}
}