fix: timers on Linux #6

Open
wiesendsi102436 wants to merge 1 commits from wiesendsi102436/info2Praktikum-DobleSpiel:bugfix/timer into main
First-time contributor

closes #5
On Linux the clock() function measures cpu time instead of wall time. This change uses the Apple code path for Linux.
output with fix:

$ ./doble player2
Wie viele Zahlen sollen gezeigt werden: 3
Numbers:     3     3     2
Welche Zahl kommt doppelt vor: 3
Sie haben die korrekte Zahl in 3.119305 Sekunde(n) gefunden und 2990 Punkte erzielt.
+---------------------------------------------+
|             H I G H S C O R E S             |
+---------------------------------------------+
| player1              |                 3999 |
+---------------------------------------------+
| player2              |                 2990 |
+---------------------------------------------+
closes #5 On Linux the clock() function measures cpu time instead of wall time. This change uses the Apple code path for Linux. output with fix: ``` $ ./doble player2 Wie viele Zahlen sollen gezeigt werden: 3 Numbers: 3 3 2 Welche Zahl kommt doppelt vor: 3 Sie haben die korrekte Zahl in 3.119305 Sekunde(n) gefunden und 2990 Punkte erzielt. +---------------------------------------------+ | H I G H S C O R E S | +---------------------------------------------+ | player1 | 3999 | +---------------------------------------------+ | player2 | 2990 | +---------------------------------------------+ ```
wiesendsi102436 added 1 commit 2025-11-30 10:43:37 +00:00
On Linux the clock() function measures cpu time instead of wall time. This change uses the Apple code path for Linux.
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u bugfix/timer:wiesendsi102436-bugfix/timer
git checkout wiesendsi102436-bugfix/timer
Sign in to join this conversation.
No Reviewers
No Label
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: freudenreichan/info2Praktikum-DobleSpiel#6
No description provided.