Skip to content

Commit fbece15

Browse files
Fix Mac OS monotonic time compilation error
Note that the Mac OS implementation isn't actually monotonic, but a stub that simply returns the wall clock. While this should be fixed, it's good enough for development on Mac OS, since the edge cases where the monotonic time differs from wall clock are rare enough that they don't interfere with development.
1 parent 3b36841 commit fbece15

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: eventTimer.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,9 @@ int ET_rtdebug_monotonic(struct EventTimer *arg, struct timeval *tv)
152152

153153
#ifdef __APPLE__
154154

155-
res = 0
156-
gettimeofday(now, NULL)
155+
res = 0;
156+
// WARNING: Not a monotonic clock, simply a stub for Apple devices.
157+
gettimeofday(&now, NULL);
157158

158159
#else
159160

0 commit comments

Comments
 (0)