mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-21 20:14:45 +00:00
rdtsc
This commit is contained in:
parent
0c106e0238
commit
967879682c
2 changed files with 4 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue