Files
ark/server/internal/core/ports/scheduler.go
Louis Singer 0d39bb6b9f Add integration tests for sweeping rounds (#339)
* add "block" scheduler type + sweep integration test

* increase timeout in integrationtests

* remove config logs

* rename scheduler package name

* rename package

* rename packages
2024-10-05 16:12:46 +02:00

19 lines
261 B
Go

package ports
type TimeUnit int
const (
UnixTime TimeUnit = iota
BlockHeight
)
type SchedulerService interface {
Start()
Stop()
Unit() TimeUnit
AddNow(lifetime int64) int64
AfterNow(expiry int64) bool
ScheduleTaskOnce(at int64, task func()) error
}