build.bqn: add minimum time between redraw, to maybe reduce flickering
This commit is contained in:
parent
946bbc4f97
commit
185e9b7a0b
@ -405,6 +405,7 @@ Run ← { 𝕊:
|
|||||||
doneCount ← 0
|
doneCount ← 0
|
||||||
stopping ← 0
|
stopping ← 0
|
||||||
Fail ← {stopping↩1 ⋄ Log 𝕩}
|
Fail ← {stopping↩1 ⋄ Log 𝕩}
|
||||||
|
nextRedraw ← ¯∞
|
||||||
DoneLine ← {𝕊: ∾⟨•Repr doneCount, "/", •Repr ≠req⟩}
|
DoneLine ← {𝕊: ∾⟨•Repr doneCount, "/", •Repr ≠req⟩}
|
||||||
{ 𝕊:
|
{ 𝕊:
|
||||||
{𝕊:
|
{𝕊:
|
||||||
@ -418,13 +419,16 @@ Run ← { 𝕊:
|
|||||||
|
|
||||||
t1 ← •MonoTime@
|
t1 ← •MonoTime@
|
||||||
tmap ↩ ⍷tmap∾Ts work
|
tmap ↩ ⍷tmap∾Ts work
|
||||||
UpdateLive (<DoneLine@)∾{
|
{ 𝕊:
|
||||||
𝕩≡≠work? "";
|
nextRedraw ↩ t1+0.1
|
||||||
o ← 𝕩⊑work
|
UpdateLive (<DoneLine@)∾{
|
||||||
∾⟨"[", FmtTime t1-o.t0, "] ", o.v.disp⟩
|
𝕩≡≠work? "";
|
||||||
}¨ (Ts work) ⊐tmap
|
o ← 𝕩⊑work
|
||||||
|
∾⟨"[", FmtTime t1-o.t0, "] ", o.v.disp⟩
|
||||||
|
}¨ (Ts work) ⊐tmap
|
||||||
|
}⍟⊢ t1>nextRedraw-0.02
|
||||||
|
|
||||||
dm ← 0.1 WaitForOne Ts work
|
dm ← (0.1⌊nextRedraw-t1) WaitForOne Ts work
|
||||||
lm ← ¬dm
|
lm ← ¬dm
|
||||||
{𝕊: Fail "Error: Fork died" ⋄ dm‿lm∧↩<dm≠¯1}⍟⊢ ∨´dm=¯1
|
{𝕊: Fail "Error: Fork died" ⋄ dm‿lm∧↩<dm≠¯1}⍟⊢ ∨´dm=¯1
|
||||||
done ← dm/work
|
done ← dm/work
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user