Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/astro/astroterm/files/patch-src_stopwatch.c
16461 views
1
--- src/stopwatch.c.orig 2025-02-09 19:38:25 UTC
2
+++ src/stopwatch.c
3
@@ -34,7 +34,7 @@ int sw_gettime(struct SwTimestamp *stamp)
4
#elif defined(__APPLE__) && defined(__MACH__)
5
// Apple OSX and iOS (Darwin)
6
7
- unsigned long long tick = clock_gettime_nsec_np(CLOCK_MONOTONIC_RAW);
8
+ unsigned long long tick = clock_gettime_nsec_np(CLOCK_MONOTONIC);
9
if (tick == 0)
10
{
11
return -1;
12
@@ -47,7 +47,7 @@ int sw_gettime(struct SwTimestamp *stamp)
13
// Available on some POSIX systems (preferable to gettimeofday() below)
14
15
struct timespec tick;
16
- int check = clock_gettime(CLOCK_MONOTONIC_RAW, &tick);
17
+ int check = clock_gettime(CLOCK_MONOTONIC, &tick);
18
if (check == -1)
19
{
20
return -1;
21
22