diff --git a/utils/times/calc_example_test.go b/utils/times/calc_example_test.go new file mode 100644 index 0000000..a9b79cd --- /dev/null +++ b/utils/times/calc_example_test.go @@ -0,0 +1,15 @@ +package times_test + +import ( + "fmt" + "github.com/kercylan98/minotaur/utils/times" + "time" +) + +func ExampleCalcNextSecWithTime() { + now := time.Date(2023, 9, 20, 0, 0, 3, 0, time.Local) + fmt.Println(times.CalcNextSecWithTime(now, 10)) + + // Output: + // 7 +}