implemented sceKernelGetProcessTimeCounter , sceKernelGetProcessTimeCounterFrequency
This commit is contained in:
parent
51dda8e8a5
commit
0ad40cff1b
|
@ -13,6 +13,7 @@
|
|||
#include "Libs.h"
|
||||
#include "Emulator/HLE/Libraries/LibKernel/FileSystem/file_system.h"
|
||||
#include "Emulator/HLE/Libraries/LibKernel/FileSystem/posix_file_system.h"
|
||||
#include "Core/hle/libraries/libkernel/time_management.h"
|
||||
|
||||
namespace HLE::Libs::LibKernel {
|
||||
|
||||
|
@ -50,6 +51,8 @@ void LibKernel_Register(SymbolsResolver* sym) {
|
|||
// fs
|
||||
LIB_FUNCTION("1G3lF1Gg1k8", "libkernel", 1, "libkernel", 1, 1, Emulator::HLE::Libraries::LibKernel::FileSystem::sceKernelOpen);
|
||||
LIB_FUNCTION("wuCroIGjt2g", "libScePosix", 1, "libkernel", 1, 1, Emulator::HLE::Libraries::LibKernel::FileSystem::POSIX::open);
|
||||
|
||||
Core::Libraries::LibKernel::timeSymbolsRegister(sym);
|
||||
}
|
||||
|
||||
}; // namespace HLE::Libs::LibKernel
|
|
@ -8,7 +8,14 @@ namespace Core::Libraries::LibKernel {
|
|||
u64 sceKernelGetProcessTime() {
|
||||
return static_cast<u64>(Emulator::emuTimer::getTimeMsec() * 1000.0); // return time in microseconds
|
||||
}
|
||||
u64 sceKernelGetProcessTimeCounter() { return Emulator::emuTimer::getTimeCounter(); }
|
||||
|
||||
void timeSymbolsRegister(SymbolsResolver* sym) { LIB_FUNCTION("4J2sUJmuHZQ", "libkernel", 1, "libkernel", 1, 1, sceKernelGetProcessTime); }
|
||||
u64 sceKernelGetProcessTimeCounterFrequency() { return Emulator::emuTimer::getTimeFrequency(); }
|
||||
|
||||
} // namespace Core::Libraries
|
||||
void timeSymbolsRegister(SymbolsResolver* sym) {
|
||||
LIB_FUNCTION("4J2sUJmuHZQ", "libkernel", 1, "libkernel", 1, 1, sceKernelGetProcessTime);
|
||||
LIB_FUNCTION("fgxnMeTNUtY", "libkernel", 1, "libkernel", 1, 1, sceKernelGetProcessTimeCounter);
|
||||
LIB_FUNCTION("BNowx2l588E", "libkernel", 1, "libkernel", 1, 1, sceKernelGetProcessTimeCounterFrequency);
|
||||
}
|
||||
|
||||
} // namespace Core::Libraries::LibKernel
|
||||
|
|
|
@ -7,4 +7,8 @@ void start() { timer.Start(); }
|
|||
|
||||
double getTimeMsec() { return timer.GetTimeMsec(); }
|
||||
|
||||
}
|
||||
u64 getTimeCounter() { return timer.GetTicks(); }
|
||||
|
||||
u64 getTimeFrequency() { return timer.GetFrequency(); }
|
||||
|
||||
} // namespace Emulator::emuTimer
|
|
@ -1,7 +1,9 @@
|
|||
#pragma once
|
||||
#include "types.h"
|
||||
|
||||
namespace Emulator::emuTimer {
|
||||
void start();
|
||||
double getTimeMsec();
|
||||
|
||||
u64 getTimeCounter();
|
||||
u64 getTimeFrequency();
|
||||
} // namespace Emulator::emuTimer
|
Loading…
Reference in New Issue