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

@ -95,6 +95,12 @@ func (t *Periodic) Start() error {
return nil
}
func (t *Periodic) WaitThenStart() {
time.AfterFunc(t.Interval, func() {
t.Start()
})
}
// Close implements common.Closable.
func (t *Periodic) Close() error {
t.access.Lock()