Files
Self-Service-Dashboard/src/worker.go
Gregory Wells 31ad22ad38 v0.0.1
2026-03-24 15:34:03 -04:00

17 lines
208 B
Go

package main
import (
"time"
)
func createWorker(interval time.Duration, task func()) {
go func() {
ticker := time.NewTicker(interval)
defer ticker.Stop()
for range ticker.C {
task()
}
}()
}