From 185e9b7a0bbffed44a96714cc12d9741132b9bc9 Mon Sep 17 00:00:00 2001 From: dzaima Date: Thu, 29 Dec 2022 16:08:53 +0200 Subject: [PATCH] build.bqn: add minimum time between redraw, to maybe reduce flickering --- build/src/build.bqn | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/build/src/build.bqn b/build/src/build.bqn index 07f5dba6..fe7d5980 100755 --- a/build/src/build.bqn +++ b/build/src/build.bqn @@ -405,6 +405,7 @@ Run ← { 𝕊: doneCount ← 0 stopping ← 0 Fail ← {stopping↩1 ⋄ Log 𝕩} + nextRedraw ← ¯∞ DoneLine ← {𝕊: ∾⟨•Repr doneCount, "/", •Repr ≠req⟩} { 𝕊: {𝕊: @@ -418,13 +419,16 @@ Run ← { 𝕊: t1 ← •MonoTime@ tmap ↩ ⍷tmap∾Ts work - UpdateLive (nextRedraw-0.02 - dm ← 0.1 WaitForOne Ts work + dm ← (0.1⌊nextRedraw-t1) WaitForOne Ts work lm ← ¬dm {𝕊: Fail "Error: Fork died" ⋄ dm‿lm∧↩