mirror of
https://github.com/tailscale/tailscale.git
synced 2025-07-15 10:08:41 +00:00
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()
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user