Time.realtimeSinceStartup returns negative number

Hello,

I’m porting an iPhone game to Android. The game will feature a 3rd part social integration (papayamobile) as a plugin, but when I go to papaya and then go back to the game, the game consistently becomes very very slow.

Time.time increases with 0.00001 each update()
Time.realtimeSinceStartup is a negative number: have had -5.161479, -3.03something
Time.timeScale is 1 at all times.

I’ve had this phenomenon happen before papaya, where it happened by just putting the app in the background and going back to it later - I’ve not been able to reproduce it that way though. Papaya triggers it consistently.

I’m thinking that it’s an onResume that doesn’t trigger something right, but I’m not sure on how and why.

Does anyone have any good ideas to what I can do? Time.realtimeSinceStartup is used quite a lot throughout the game, so this is essentially a game-breaker.

Can I “jump start” the timer again when my application returns to active?

I have been told that this is fixed in Unity 3.4. I guess I’ll just have to wait.

Nope, I’m still getting this problem. Solutions Unity staff people?

I eventually used DateTime.Now to get the system time and DateTime.Now.Subtract(oTime).TotalSeconds to get the delta time in seconds to mimic what I was doing with Time.realtimeSinceStartup.