We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 971fbf6 commit 76d05d4Copy full SHA for 76d05d4
src/google/protobuf/map.h
@@ -25,7 +25,7 @@
25
#include <utility>
26
27
#if !defined(GOOGLE_PROTOBUF_NO_RDTSC) && defined(__APPLE__)
28
-#include <mach/mach_time.h>
+#include <time.h>
29
#endif
30
31
#include "google/protobuf/stubs/common.h"
@@ -691,7 +691,7 @@ class PROTOBUF_EXPORT UntypedMapBase {
691
#if defined(__APPLE__)
692
// Use a commpage-based fast time function on Apple environments (MacOS,
693
// iOS, tvOS, watchOS, etc).
694
- s += mach_absolute_time();
+ s = clock_gettime_nsec_np(CLOCK_UPTIME_RAW);
695
#elif defined(__x86_64__) && defined(__GNUC__)
696
uint32_t hi, lo;
697
asm volatile("rdtsc" : "=a"(lo), "=d"(hi));
0 commit comments