test: 新增 times.CalcNextSecWithTime 示例代码

This commit is contained in:
kercylan98 2023-09-20 17:21:16 +08:00
parent 18a5d33215
commit 149e6a2149
1 changed files with 15 additions and 0 deletions

View File

@ -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
}