ports/astro/astroterm/files/patch-src_stopwatch.c
Wen Heping f84754e16b astro/astroterm: New port
astroterm is a terminal-based star map written in C. It displays the real-time
positions of stars, planets, constellations, and more, all within your terminal
and no telescope required! Configure sky views by date, time, and location with
precise ASCII-rendered visuals.
PR:		284690
Reported by:	nxjoseph@protonmail.com
2025-02-13 07:26:23 +00:00

20 lines
737 B
C

--- src/stopwatch.c.orig 2025-02-09 19:38:25 UTC
+++ src/stopwatch.c
@@ -34,7 +34,7 @@ int sw_gettime(struct SwTimestamp *stamp)
#elif defined(__APPLE__) && defined(__MACH__)
// Apple OSX and iOS (Darwin)
- unsigned long long tick = clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW);
+ unsigned long long tick = clock_gettime_nsec_np(CLOCK_MONOTONIC);
if (tick == 0)
{
return -1;
@@ -47,7 +47,7 @@ int sw_gettime(struct SwTimestamp *stamp)
// Available on some POSIX systems (preferable to gettimeofday() below)
struct timespec tick;
- int check = clock_gettime(CLOCK_MONOTONIC_RAW, &tick);
+ int check = clock_gettime(CLOCK_MONOTONIC, &tick);
if (check == -1)
{
return -1;