~ knotless Search/
↑↓ move↵ open⇧↵ all results

socialweb.computer/socialweb-computer-kcp

socialweb.computer: a compute market on atproto (kcp)

1 collaborator
0
0
17 lines · 288 B Raw History
package runtime

import "time"

func Period(configured, fallback time.Duration) time.Duration {
	if configured == 0 {
		return fallback
	}
	return configured
}

func RefreshAfter(period time.Duration) Result {
	if period <= 0 {
		return Result{}
	}
	return Result{RequeueAfter: period}
}