jonboulle / clockwork

a fake clock for golang
Apache License 2.0
625 stars 57 forks source link

add AfterFunc #45

Closed muir closed 1 year ago

muir commented 1 year ago

I didn't see a way to build the equivalent of time.AfterFunc using the public APIs without leaking a goroutine and the callback func.

With the internal APIs, it's pretty easy.

sagikazarmark commented 1 year ago

Fixed in #44