clockwork - a fake clock for golang
last updated: Oct 20, 2023
https://github.com/jonboulle/clockwork
Replace uses of the
timepackage with theclockwork.Clockinterface instead.
For example, instead of using
time.Sleepdirectly:
func myFunc() {
time.Sleep(3 * time.Second)
doSomething()
}