mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 22:00:11 +08:00
23 lines
309 B
Go
23 lines
309 B
Go
package timer
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
)
|
|
|
|
func TestNextWakeTime(t *testing.T) {
|
|
logrus.SetLevel(logrus.DebugLevel)
|
|
ts := &Timer{
|
|
En1Month4Day5Week3Hour5Min6: 0xffffff,
|
|
}
|
|
t1 := time.Until(ts.nextWakeTime())
|
|
if t1 < 0 {
|
|
t.Log(t1)
|
|
t.Fail()
|
|
}
|
|
t.Log(t1)
|
|
t.Fail()
|
|
}
|