Artifact edca6c5d399a4fb4df63f3903518614b252024a408adafee59a5277cd826693f:
- File
simio/clock.go
— part of check-in
[b2dcbb7130]
at
2026-10-25 23:02:28
on branch main
— ci: check gofmt; format the tree
Sixteen files had drifted from gofmt: struct and comment alignment, one-line if bodies in auth_test.go, trailing blank lines, and a blank comment line gofmt now puts before an indented block in two delta.go doc comments. The test job now fails on any tracked .go file gofmt would change, and lists it. (user: [email protected], size: 517) [annotate] [blame] [check-ins using] [more...]
package simio import "time" // Clock abstracts time operations for deterministic simulation. type Clock interface { Now() time.Time After(d time.Duration) <-chan time.Time Sleep(d time.Duration) } // RealClock delegates to the standard time package. type RealClock struct{} func (RealClock) Now() time.Time { return time.Now() } func (RealClock) After(d time.Duration) <-chan time.Time { return time.After(d) } func (RealClock) Sleep(d time.Duration) { time.Sleep(d) }