From 42e62a7eb2b890b7455903f65f4e20668d85baf0 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 17 Apr 2020 13:19:41 -0700 Subject: [PATCH] testy: fix clock initialization when Start is provided. Signed-off-by: David Anderson --- testy/clock.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testy/clock.go b/testy/clock.go index 9bf77530a..8608a69e2 100644 --- a/testy/clock.go +++ b/testy/clock.go @@ -32,6 +32,8 @@ func (c *Clock) Now() time.Time { defer c.Unlock() if c.Start.IsZero() { c.Start = time.Now() + } + if c.Present.Before(c.Start) { c.Present = c.Start } step := c.Step