Rearm timer for the next time
This commit is contained in:
parent
6ae3c92cbc
commit
f8be28744c
1 changed files with 4 additions and 0 deletions
4
app.go
4
app.go
|
|
@ -84,6 +84,10 @@ func (app *App) ResetTimer() {
|
|||
app.nextAlarm = time.AfterFunc(time.Until(*na), func() {
|
||||
app.nextAlarm = nil
|
||||
reveil.RemoveOldAlarmsSingle(app.db)
|
||||
|
||||
// Rearm timer for the next time
|
||||
app.ResetTimer()
|
||||
|
||||
err := player.WakeUp(app.cfg, routines)
|
||||
if err != nil {
|
||||
log.Println(err.Error())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue