This commit is contained in:
Niko 2024-09-04 21:58:50 -04:00
parent 0c106e0238
commit 967879682c
2 changed files with 4 additions and 9 deletions

View file

@ -40,8 +40,6 @@ static u64 GetTimeNs() {
u64 EstimateRDTSCFrequency()
{
#ifdef __x86_64__
// Discard the first result measuring the rdtsc.
FencedRDTSC();
std::this_thread::sleep_for(std::chrono::milliseconds{1});
@ -58,12 +56,6 @@ u64 EstimateRDTSCFrequency()
const u64 tsc_diff = tsc_end - tsc_start;
const u64 tsc_freq = MultiplyAndDivide64(tsc_diff, 1000000000ULL, end_time - start_time);
return RoundToNearest<100'000>(tsc_freq);
#else
return 0;
#endif
}
} // namespace Common

View file

@ -8,6 +8,7 @@
#endif
#include "common/types.h"
#include "common/logging/log.h"
namespace Common {
@ -38,7 +39,9 @@ static inline u64 FencedRDTSC() {
#else
// ARM
static inline u64 FencedRDTSC() {
static inline u64 FencedRDTSC()
{
LOG_INFO(Core_Linker, "TODO: ARM FencedRDTSC");
return 0;
}
#endif