package
0.32.1
Repository: https://github.com/adguardteam/golibs.git
Documentation: pkg.go.dev

# Functions

NewConstSchedule returns a new schedule that runs with a constant interval.
NewCronSchedule returns a new cron schedule adapted to the [Schedule] interface.
NewRandomizedSchedule returns a new schedule that adds a random value between minAdd and maxAdd to the result of sched.

# Constants

Day is the duration of one day.

# Structs

ConstSchedule is a [Schedule] for tasks that run with a constant interval between the runs.
CronSchedule is an adapter for the cron module.
RandomizedSchedule adds a random duration to the result of the [Schedule] that it wraps.
SystemClock is a [Clock] that uses the functions from package time.

# Interfaces

Clock is an interface for time-related operations.
ClockAfter is an extension of the Clock interface for clocks that can create timers.
Schedule is an interface for entities that can decide when a task should be performed based on the current time.

# Type aliases

Duration is a helper type for time.Duration providing functionality for encoding.