mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
sceNp: improve sceNpManagerGetNetworkTime function (#5451)
This commit is contained in:
parent
dbd4814584
commit
7c74bafaf3
1 changed files with 5 additions and 1 deletions
|
@ -1051,7 +1051,7 @@ s32 sceNpManagerGetStatus(vm::ptr<s32> status)
|
|||
|
||||
s32 sceNpManagerGetNetworkTime(vm::ptr<CellRtcTick> pTick)
|
||||
{
|
||||
sceNp.todo("sceNpManagerGetNetworkTime(pTick=*0x%x)", pTick);
|
||||
sceNp.warning("sceNpManagerGetNetworkTime(pTick=*0x%x)", pTick);
|
||||
|
||||
if (!pTick)
|
||||
{
|
||||
|
@ -1068,6 +1068,10 @@ s32 sceNpManagerGetNetworkTime(vm::ptr<CellRtcTick> pTick)
|
|||
return SCE_NP_ERROR_INVALID_STATE;
|
||||
}
|
||||
|
||||
// FIXME: Get the network time
|
||||
auto now = std::chrono::system_clock::now();
|
||||
pTick->tick = std::chrono::duration_cast<std::chrono::microseconds>(now.time_since_epoch()).count();
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue