I tested SYS_Time() function (like you did on libogc patch) but it doesn't return the same value than getWiiTime().
The value is much smaller and is neither ticks nor seconds since 2000.
I'm not sure if I did something wrong, so I compiled your example and both functions return different values.
I didn't test to launch a game with playlog setting enabled, but suppose it won't work.
Playlog works fine with the game launch time returned by getWiiTime().
I can't use a smaller value or it would think the user played 24h+ (or kept the game running for months/years) when comparing launch time and exit time.
Though, gettime() is good to compare function execution time ;)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm posting the reply here (original on googlecode)
Strange, it was working fine on my wii, as well as in Dolphin. :/
Mind posting the code you used originally? I'd like to compare and see if I may have messed up somewhere.
Hmm, I just tested, I think what's happening is there is some weird rounding going on. SYS_Time is working properly in Dolphin and on my wii.
On top of that, depending on which order you call them in one is always going to be slightly behind the other. I swapped the order, and getWiiTime was smaller than SYS_Time instead of larger.
AH, I figured it out, if you look at the following code listing, you'll notice that libogc doing exactly what my SYS_Time function is doing as well as adding time to return the time since epoch value 946684800. But it's also having to round because time_t isn't a u64, it's a u32 http://pastebin.com/6hS45v9D and from machine/types.h: #define TIME_T long / time() /
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "issues Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Issues"
Originally posted by: antidote.crk@gmail.com
I've created a PR on libogc which adds SYS_Time(), which would simplify such tasks as GC Save and play_rec.dat manipulation.
https://github.com/devkitPro/libogc/pull/1
View and moderate all "issues Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Issues"
Originally posted by: c...@mangaheart.org
Thank you.
View and moderate all "issues Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Issues"
Originally posted by: antidote.crk@gmail.com
No problem.
View and moderate all "issues Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Issues"
Originally posted by: c...@mangaheart.org
I tested SYS_Time() function (like you did on libogc patch) but it doesn't return the same value than getWiiTime().
The value is much smaller and is neither ticks nor seconds since 2000.
I'm not sure if I did something wrong, so I compiled your example and both functions return different values.
I didn't test to launch a game with playlog setting enabled, but suppose it won't work.
Playlog works fine with the game launch time returned by getWiiTime().
I can't use a smaller value or it would think the user played 24h+ (or kept the game running for months/years) when comparing launch time and exit time.
Though, gettime() is good to compare function execution time ;)
I'm posting the reply here (original on googlecode)
Strange, it was working fine on my wii, as well as in Dolphin. :/
Mind posting the code you used originally? I'd like to compare and see if I may have messed up somewhere.
Hmm, I just tested, I think what's happening is there is some weird rounding going on. SYS_Time is working properly in Dolphin and on my wii.
On top of that, depending on which order you call them in one is always going to be slightly behind the other. I swapped the order, and getWiiTime was smaller than SYS_Time instead of larger.
AH, I figured it out, if you look at the following code listing, you'll notice that libogc doing exactly what my SYS_Time function is doing as well as adding time to return the time since epoch value 946684800. But it's also having to round because time_t isn't a u64, it's a u32 http://pastebin.com/6hS45v9D and from machine/types.h: #define TIME_T long / time() /