Add generic utils constraint function

This commit is contained in:
Marcel Meyer
2025-12-23 09:14:33 +09:00
committed by Junegunn Choi
parent 14b5e1d88c
commit 6eb4b41e34
4 changed files with 5 additions and 52 deletions
+1 -1
View File
@@ -530,7 +530,7 @@ func Run(opts *Options) (int, error) {
break
}
if delay && reading {
dur := util.DurWithin(
dur := util.Constrain(
time.Duration(ticks-startTick)*coordinatorDelayStep,
0, coordinatorDelayMax)
time.Sleep(dur)