Wait some time before displaying the proxy usage log

This commit is contained in:
itchyonion 2022-03-30 12:24:43 -07:00 committed by Cecylia Bocovich
parent dd83b68efa
commit 9757784c5a
No known key found for this signature in database
GPG key ID: 009DE379FD9B7B90
2 changed files with 7 additions and 1 deletions

View file

@ -13,7 +13,7 @@ func NewProxyEventLogger(logPeriod time.Duration, output io.Writer) event.Snowfl
logger := log.New(output, "", log.LstdFlags|log.LUTC)
el := &logEventLogger{logPeriod: logPeriod, logger: logger}
el.task = &task.Periodic{Interval: logPeriod, Execute: el.logTick}
el.task.Start()
el.task.WaitThenStart()
return el
}