Support for contention logging with ART futexes.
Remove dangerous postfix operators on AtomicInteger. Clean up the atomic stack.
Factor nanosleep into a useful shared utils.h routine.
Change-Id: I417a73007c23fe247f410f41b2fa41a717c22139
diff --git a/src/utils.cc b/src/utils.cc
index 78d3599..e2231c2 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -180,6 +180,13 @@
#endif
}
+void NanoSleep(uint64_t ns) {
+ timespec tm;
+ tm.tv_sec = 0;
+ tm.tv_nsec = ns;
+ nanosleep(&tm, NULL);
+}
+
void InitTimeSpec(bool absolute, int clock, int64_t ms, int32_t ns, timespec* ts) {
int64_t endSec;