diff options
-rwxr-xr-x[-rw-r--r--] | apps/plugins/stopwatch.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/apps/plugins/stopwatch.c b/apps/plugins/stopwatch.c index 7a7828b3f3..49f633a2a9 100644..100755 --- a/apps/plugins/stopwatch.c +++ b/apps/plugins/stopwatch.c | |||
@@ -539,9 +539,19 @@ enum plugin_status plugin_start(const void* parameter) | |||
539 | 539 | ||
540 | /* Lap timer */ | 540 | /* Lap timer */ |
541 | case STOPWATCH_LAP_TIMER: | 541 | case STOPWATCH_LAP_TIMER: |
542 | lap_times[curr_lap%MAX_LAPS] = stopwatch; | 542 | /*check if we're timing, and start if not*/ |
543 | curr_lap++; | 543 | if (counting) |
544 | update_lap = true; | 544 | { |
545 | lap_times[curr_lap%MAX_LAPS] = stopwatch; | ||
546 | curr_lap++; | ||
547 | update_lap = true; | ||
548 | } | ||
549 | else | ||
550 | { | ||
551 | counting = ! counting; | ||
552 | start_at = *rb->current_tick; | ||
553 | stopwatch = prev_total + *rb->current_tick - start_at; | ||
554 | } | ||
545 | break; | 555 | break; |
546 | 556 | ||
547 | /* Scroll Lap timer up */ | 557 | /* Scroll Lap timer up */ |