testy: fix clock initialization when Start is provided.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
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…
Reference in New Issue