Browse Source

mach_approximate_time() requires Mac 10.10+, so use mach_absolute_time() instead.

tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
0932c80370
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      src/system.cpp

+ 1
- 2
src/system.cpp View File

@@ -705,8 +705,7 @@ double getTime() {
return (time - startTime) / 1e9;
#endif
#if defined ARCH_MAC
// Similar to mach_absolute_time() except it doesn't call the kernel every time.
int64_t counter = mach_approximate_time();
int64_t counter = mach_absolute_time();
return (counter - startCounter) * counterTime;
#endif
}


Loading…
Cancel
Save