clockwork - a fake clock for golang

last updated: Oct 20, 2023

https://github.com/jonboulle/clockwork

Replace uses of the time package with the clockwork.Clock interface instead.

For example, instead of using time.Sleep directly:

func myFunc() {
	time.Sleep(3 * time.Second)
	doSomething()
}
↑ up