aboutsummaryrefslogtreecommitdiff
path: root/lib/time/scheduler_example_test.go
AgeCommit message (Collapse)Author
2026-01-15all: convert license and copyright to use SPDX identifiersShulhan
With help of spdxconv tool [1], we able to bulk update all files license and copyright format to comply with SPDX formats. [1] https://kilabit.info/project/spdxconv/
2023-12-17lib/time: un-export the variable NowShulhan
The original idea of providing Now is to mock the current time in testing Scheduler. Since this variable can be overridden by other packages, it is not safe to export it, hence we un-export it here so it can be used internal only.
2023-02-25lib/time: add method Next to SchedulerShulhan
The Next method return the next schedule. This changes require refactoring on each calculation on schedule by returning the next time.Time instead of setting it inside directly, which affect on simplification of nextMinutely and nextHourly.