Skip to content

Commit

Permalink
Update timer.c
Browse files Browse the repository at this point in the history
  • Loading branch information
jdarge authored Aug 8, 2023
1 parent e93ef21 commit 4ee9116
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

int timer (char** str) {

int duration = get_time_in_s(str[1], str[2]);
int duration = get_time_in_s(str[1], str[2]);

time_t start_time = time(NULL);
time_t start_time = time(NULL);
time_t end_time = start_time + duration;

while (time(NULL) < end_time) {
Expand Down Expand Up @@ -65,4 +65,4 @@ int get_time_in_s(char* str, char* num) {
}

return duration;
}
}

0 comments on commit 4ee9116

Please sign in to comment.