Skip to content

Commit 313cc2f

Browse files
committed
Reset timer on restart action
Fixes #2
1 parent 66c331c commit 313cc2f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/lib.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ async fn main() {
101101

102102
if action.changed() {
103103
match action.current {
104-
TIMER_ACTION_START | TIMER_ACTION_RESTART => {
104+
TIMER_ACTION_START => {
105+
timer::start();
106+
}
107+
TIMER_ACTION_RESTART => {
108+
timer::reset();
109+
timer::pause_game_time();
105110
timer::start();
106111
}
107112
TIMER_ACTION_SPLIT | TIMER_ACTION_END => {

0 commit comments

Comments
 (0)