testy: fix clock initialization when Start is provided.
Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
@ -32,6 +32,8 @@ func (c *Clock) Now() time.Time {
|
|||||||
defer c.Unlock()
|
defer c.Unlock()
|
||||||
if c.Start.IsZero() {
|
if c.Start.IsZero() {
|
||||||
c.Start = time.Now()
|
c.Start = time.Now()
|
||||||
|
}
|
||||||
|
if c.Present.Before(c.Start) {
|
||||||
c.Present = c.Start
|
c.Present = c.Start
|
||||||
}
|
}
|
||||||
step := c.Step
|
step := c.Step
|
||||||
|
Reference in New Issue
Block a user