switched to time.Duration

This commit is contained in:
Sam Lewis
2022-10-11 02:17:02 -04:00
parent 44678ae762
commit 911c3521ba
4 changed files with 34 additions and 47 deletions

View File

@@ -10,7 +10,7 @@ import (
func main() {
app := ga.App("192.168.86.67:8123")
defer app.Cleanup()
s := ga.ScheduleBuilder().Call(lightsOut).Daily().At(ga.Sunset().Subtract(ga.TimeOfDay(0, 30))).Build()
s := ga.ScheduleBuilder().Call(lightsOut).Daily().At(ga.Sunset()).Build()
s2 := ga.ScheduleBuilder().Call(lightsOut).Every(time.Hour*4 + time.Minute*30).Offset(ga.TimeOfDay(1, 0)).Build()
app.RegisterSchedule(s2)
app.Start()