a41f938cec
As we have seen, dependencies version can prevent the build. We should user lock versions on dependencies that we know work: * Packages are vendored * Add Godep support * Added addtional install step in readme * Fix travis build error
15 lignes
265 o
Go
15 lignes
265 o
Go
package missinggo
|
|
|
|
import (
|
|
"math"
|
|
"time"
|
|
)
|
|
|
|
// Returns a time.Timer that calls f. The timer is initially stopped.
|
|
func StoppedFuncTimer(f func()) (t *time.Timer) {
|
|
t = time.AfterFunc(math.MaxInt64, f)
|
|
if !t.Stop() {
|
|
panic("timer already fired")
|
|
}
|
|
return
|
|
}
|