Use system_clock for current wall-clock time#234
Conversation
Replaced steady_clock with system_clock to get current time.
|
I obviously don't know what I'm doing. The second commit was supposed to only update my fork of aurora. Fixed it? |
|
Looks like this issue (or something similar) was already explored in PR #61. I was afraid this might break other stuff. |
|
So I had a bit of an epiphany last night. One that would essentially make this PR irrelevant. AFAIK, the only instance where time is shown to the player is when saving or on the file select screen. Using chrono::system_clock::now() there instead of OSGetTime() used to get the time would circumvent the sleep mode desync bug while still being able to keep the steady_clock running in the background. Any instance going forward that isn't linked to actual game logic should probably use this function to get actual device time. LMK if this solution would be preferred and I'll close this PR. |
|
My thought is to provide an OSGetSystemTime() that uses system_clock and update appropriate places in Dusklight to use it, so that OSGetTime can remain a steady clock for timing purposes |
|
Like I thought. Alright, closing. |
Replaced steady_clock with system_clock to get current time. Changes made using Claude code. Could be absolute garbage. Feel free to trash this PR if necessary.
Should close issue #232.