early-access version 2203
This commit is contained in:
@@ -58,8 +58,7 @@ u64 NativeClock::GetRTSC() {
|
||||
TimePoint new_time_point{};
|
||||
TimePoint current_time_point{};
|
||||
do {
|
||||
std::ignore = Common::AtomicCompareAndSwap(current_time_point.pack.data(), time_point.pack,
|
||||
u128{0}); // comparison value doesn't matter
|
||||
current_time_point.pack = time_point.pack;
|
||||
_mm_mfence();
|
||||
const u64 current_measure = __rdtsc();
|
||||
u64 diff = current_measure - current_time_point.inner.last_measure;
|
||||
@@ -79,9 +78,7 @@ void NativeClock::Pause(bool is_paused) {
|
||||
TimePoint current_time_point{};
|
||||
TimePoint new_time_point{};
|
||||
do {
|
||||
std::ignore =
|
||||
Common::AtomicCompareAndSwap(current_time_point.pack.data(), time_point.pack,
|
||||
u128{0}); // comparison value doesn't matter
|
||||
current_time_point.pack = time_point.pack;
|
||||
new_time_point.pack = current_time_point.pack;
|
||||
_mm_mfence();
|
||||
new_time_point.inner.last_measure = __rdtsc();
|
||||
|
Reference in New Issue
Block a user