testy: fix clock initialization when Start is provided.

Signed-off-by: David Anderson <danderson@tailscale.com>
pull/308/head
David Anderson 5 years ago
parent ccfc4e0634
commit 42e62a7eb2

@ -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

Loading…
Cancel
Save