Add Jvm.nanoPause to tight loops

This commit is contained in:
Peter Lawrey
2020-06-19 10:30:28 +01:00
parent 9bc37f830b
commit bc5453d292
@@ -16,6 +16,7 @@
package net.openhft.chronicle.hash.replication;
import net.openhft.chronicle.core.Jvm;
import net.openhft.chronicle.hash.ChronicleHash;
import net.openhft.chronicle.hash.ChronicleHashBuilderPrivateAPI;
@@ -61,6 +62,7 @@ public final class TimeProvider {
return lastTime;
if (lastTimeHolder.compareAndSet(lastTime, now))
return now;
Jvm.nanoPause();
}
}