Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

time: Update for 15.0.0 changes and fixes long standing issues #4822

Merged
merged 6 commits into from May 7, 2023

Conversation

marysaka
Copy link
Contributor

@marysaka marysaka commented May 5, 2023

Last time we did an upgrade on the time service was during 9.x era, it was about time to take back that reverse again!

15.0.0 added a new structure on the shared memory to get steady clock raw timepoints with a granularity in nanoseconds.

This PR implements this new part.

I plan to write a follow up with a bit of refactoring of this ancient part of the emulator.

As always, reverse and work done by your truly.

This should also fix local and network clock returning 0 under usage with shared memory.

FIx #2430.

PS: As a reminder, if this change is reused anywhere else, work should be credited as Ryujinx and not my person.

@marysaka marysaka added enhancement New feature or request service:time Related to the time module (Ryujinx.HLE.HOS.Services.Time) labels May 5, 2023
@marysaka marysaka requested review from AcK77, gdkchan and a team May 5, 2023 21:06
Last time we did an upgrade on the time service was during 9.x era, it was about time to take back that reverse again!

15.0.0 added a new structure on the shared memory to get steady clock raw timepoints with a granularity in nanoseconds.

This commit implements this new part.

I plan to write a follow up with a bit of refactoring of this ancient part of the emulator.

As always, reverse and work done by your truly.

PS: As a reminder, if this change is reused anywhere else, work should be credited as Ryujinx and not my person.
This should fix local and network clock returning 0 under usage with
shared memory.

This probably fix #2430.
@marysaka marysaka requested review from gdkchan, TSRBerry and a team May 5, 2023 23:40
@TSRBerry
Copy link
Member

TSRBerry commented May 6, 2023

Testing with switch-examples: time
image

In game time and prepo logs for ACNH were also always correct! So seems like everything is working fine!

Copy link
Member

@TSRBerry TSRBerry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@marysaka marysaka changed the title time: Update for 15.0.0 changes time: Update for 15.0.0 changes and fixes long standing issues May 6, 2023
@marysaka marysaka requested a review from a team May 6, 2023 22:27
Copy link
Member

@gdkchan gdkchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm other than the comment. Nice to see the long standing Pokémon issue fixed.

src/Ryujinx.HLE/HOS/Horizon.cs Show resolved Hide resolved
AcK77 added a commit to AcK77/Ryujinx that referenced this pull request May 7, 2023
During testing of Ryujinx#4822, Mary pointed out the way we calculate time offset is wrong in our Avalonia UI. This PR fixed that.
The axaml file is autoformatted too.
src/Ryujinx.HLE/HOS/Horizon.cs Show resolved Hide resolved
@AcK77 AcK77 merged commit 470a803 into Ryujinx:master May 7, 2023
6 checks passed
AcK77 added a commit that referenced this pull request May 7, 2023
* Ava: Fix SystemTimeOffset calculation

During testing of #4822, Mary pointed out the way we calculate time offset is wrong in our Avalonia UI. This PR fixed that.
The axaml file is autoformatted too.

* DateTime.Now in local var
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request service:time Related to the time module (Ryujinx.HLE.HOS.Services.Time)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Pokemon Sw/Sh] Daily events + Pokejobs broken
4 participants