mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-05 22:55:04 -06:00
sceNp: improve sceNpManagerGetNetworkTime function (#5451)
This commit is contained in:
parent
dbd4814584
commit
7c74bafaf3
@ -1051,7 +1051,7 @@ s32 sceNpManagerGetStatus(vm::ptr<s32> status)
|
|||||||
|
|
||||||
s32 sceNpManagerGetNetworkTime(vm::ptr<CellRtcTick> pTick)
|
s32 sceNpManagerGetNetworkTime(vm::ptr<CellRtcTick> pTick)
|
||||||
{
|
{
|
||||||
sceNp.todo("sceNpManagerGetNetworkTime(pTick=*0x%x)", pTick);
|
sceNp.warning("sceNpManagerGetNetworkTime(pTick=*0x%x)", pTick);
|
||||||
|
|
||||||
if (!pTick)
|
if (!pTick)
|
||||||
{
|
{
|
||||||
@ -1068,6 +1068,10 @@ s32 sceNpManagerGetNetworkTime(vm::ptr<CellRtcTick> pTick)
|
|||||||
return SCE_NP_ERROR_INVALID_STATE;
|
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;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user