Adjust initial coordinator delay

This commit is contained in:
Junegunn Choi
2015-01-08 22:07:04 +09:00
parent efec9acd6f
commit f401c42f9c
2 changed files with 20 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
package fzf
import "time"
func Max(first int, items ...int) int {
max := first
for _, item := range items {
@@ -19,3 +21,14 @@ func Min(first int, items ...int) int {
}
return min
}
func DurWithin(
val time.Duration, min time.Duration, max time.Duration) time.Duration {
if val < min {
return min
}
if val > max {
return max
}
return val
}