]> git.giacomolli.uk - onechat/blob - clock_helper_test.go
Order model and chat declarations
[onechat] / clock_helper_test.go
1 package main
2
3 import "time"
4
5 // TestClock is a clock that tests set by hand.
6 type TestClock struct {
7 now time.Time
8 }
9
10 func newTestClock() *TestClock {
11 return &TestClock{
12 now: time.Date(2026, 1, 1, 12, 0, 0, 0, time.UTC),
13 }
14 }
15
16 func (c *TestClock) Now() time.Time {
17 return c.now
18 }