this:
unix_time_3.mfa
this:
unix_time_3.mfa
Thank you Schrodinger!
Actually though, when I thought about it now taking a walk I realized that the unix time is not really necessary like you said!
The only number I am actually after is how many seconds have passed since the game last saved the time and when the user comes back to the app again. So it just need to calculate how many seconds passed since then. So if it had been 1 day and 2 hours when they come back, then I would need to know how many seconds that are in total. Maybe that would be possible to make it even simpler?
The reason unix time was useful for this was that I could just compare the old unix timestamp with the new one and get the diffarance in seconds. But yes, maybe that is unnecessary complicated?
Yes, if you only need the difference in seconds, we can avoid calculating Unix time,
but we're probably going to use a similar method like the one in last example
to be on the safe side we have to take in consideration anyway leap years, numbers of days in months etc.
you could store:
year - month - day - hour - min - sec
on game stop, and fire a loop counting difference like the one in example above
OR
we could look in Julian days, I think they could be used to make subtractions.... have to take a look!











There is also this extension for Android that has unix timestamp - http://community.clickteam.com/threads/86067-Extension-More-Android-Info
Not sure if it's still working though.
Oh that extension seem to work ! That must be a simpler way to do it then?
The only problem I have is that this timestamp display 3 digits more, it seems to be displaying not only seconds, but also milliseconds etc. Can I remove the 3 numbers at the end? I always forget how one does that :s
I recorded how it looks like (must be run on an android device to display it, I run it on my Andy emulator): https://dl.dropboxusercontent.com/u/...-12_165939.wmv
It is recorded in 10fps though so the numbers goes much faster in reality.
Andy emulator is here btw, it is really practical for fast testing I have found: http://www.andyroid.net/
ahhh great!
you can divide by 1000 to get rid of last three digits
but if the number is (likely) too big to be handled by Fusion ( > 32bit int)
you can use some string manipulation trick
like:
left$(str$(timestamp), len(str$(timestamp))-3)
Thanks Schrodinger I will see if I don't mess it up![]()
About this to make the number shorter to be able to handle by Fusion and removing the last 3 digits, how should I write it to get an expression that works? I get expression error when trying to do it :/ My full formula looks like this:
left$(str$(GetUnixTimestamp$( "More Android Info Extension" )), len(str$(GetUnixTimestamp$( "More Android Info Extension" )))-3)
It seems there are uneven ( ) but where should I place some?
Ah, looks like "getunixtimestamp$" is already a string,
then you don't need the additionals str$()
so should be simply:
Left$(GetUnixTimestamp$( "More Android Info Extension" ), Len(GetUnixTimestamp$( "More Android Info Extension" )) - 3 )