diff --git a/gokrazy.go b/gokrazy.go index 15c818b..5e95853 100644 --- a/gokrazy.go +++ b/gokrazy.go @@ -138,12 +138,12 @@ func Supervise(commands []*exec.Cmd) error { // set. Assumes that the system boots with a clock value of January 1, // 1970 UTC (UNIX epoch), as is the case on the Raspberry Pi 3. func WaitForClock() { - epochPlus1Minute := time.Unix(60, 0) + epochPlus1Year := time.Unix(60*60*24*365, 0) for { - if time.Now().After(epochPlus1Minute) { + if time.Now().After(epochPlus1Year) { return } - // Sleeps for 1 real minute, regardless of wall-clock time. + // Sleeps for 1 real second, regardless of wall-clock time. // See https://github.com/golang/proposal/blob/master/design/12914-monotonic.md time.Sleep(1 * time.Second) }