mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 09:57:51 +08:00
13 lines
236 B
Go
13 lines
236 B
Go
package edit
|
|
|
|
import "time"
|
|
|
|
// After is like time.After, except that it interpretes negative Duration as
|
|
// "forever".
|
|
func After(d time.Duration) <-chan time.Time {
|
|
if d < 0 {
|
|
return make(chan time.Time)
|
|
}
|
|
return time.After(d)
|
|
}
|