diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-17 15:25:52 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-17 15:25:52 +0300 |
| commit | 914bd7cd6aa14e839332a98d91c30b19865b0cf2 (patch) | |
| tree | 02b11537237a204048589e14ed24938b805e42f7 /internal/clock/clock.go | |
| parent | 3b24f0e1be832584d6550e8cc3e5d24329f66f90 (diff) | |
Restructure repo: move Go server into player-server/
Diffstat (limited to 'internal/clock/clock.go')
| -rw-r--r-- | internal/clock/clock.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/internal/clock/clock.go b/internal/clock/clock.go deleted file mode 100644 index 8809109..0000000 --- a/internal/clock/clock.go +++ /dev/null @@ -1,28 +0,0 @@ -// Package clock abstracts time for testability. -package clock - -import "time" - -// Clock provides the current time. -type Clock interface { - Now() time.Time -} - -// RealClock uses the system clock. -type RealClock struct{} - -// Now returns the current time. -func (RealClock) Now() time.Time { return time.Now() } - -// MockClock is a fake clock for testing. -type MockClock struct { - T time.Time -} - -// Now returns the mock time. -func (m *MockClock) Now() time.Time { return m.T } - -var ( - _ Clock = (*RealClock)(nil) - _ Clock = (*MockClock)(nil) -) |
