Skip to content

Commit

Permalink
#27 adds 1 minute slop to midnight check
Browse files Browse the repository at this point in the history
  • Loading branch information
noah10 committed Nov 8, 2023
1 parent 47675b7 commit 46564df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/renderer/components/TrainingComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
const midnight = new Date()
midnight.setHours(23); midnight.setMinutes(59); midnight.setSeconds(59);
const minutesRemainingToday = (midnight - now) / (1000 * 60)
noTime.value = minutesRemainingToday < sessionMinutes
noTime.value = minutesRemainingToday < sessionMinutes + 1 // +1 to allow a little time for sensor delays
if (noTime.value) return // audio won't matter; they aren't doing any more today
condition.value = await getCondition()
Expand Down

0 comments on commit 46564df

Please sign in to comment.