test: 新增 times.CalcNextSecWithTime 示例代码
This commit is contained in:
parent
18a5d33215
commit
149e6a2149
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue