What's new

When does $ENGINE_UPTIME reach its limit?

nosfoe

New Member
A bit of a general question:
Does anybody know about how long it takes until $ENGINE_UPTIME reaches its limit? The manual states that in KSP_TIMER (in microseconds) maxes out after about 30 min. I guess that means that $ENGINE_UPTIME will last for about 20 days?
I'm using it for stuff in the interface, so it would be unpractical if those functions stopped working too soon...
 
About 596 hours until the max positive number is reached (0x7fffffff). However, it may continue on with 0x8000000 and continue to climb for another 596 hours until it reaches zero and then starts all over.

I've never actually run a test to see what it does at the 0x7fffffff point. The simplest thing would be to just continue through all the values with the sign bit on. So, if your usage algorithm simply computes differences between start and stop time, you should be able to use it for about 1193 hours before you will get a wrap-around issue. :lol:

Maybe someone has actually run the thing for 25 days or so and taken some data at the 0x7fffffff point? If so, perhaps they will share their findings with us :roll:

Rejoice,

Bob
 
Thanks for the reply Bob! The only situation I could imagine this causing trouble would be an installation that's running for several days... And in my case it would only cause problems at the wrap-around moment, so the chance that it happens is extremely small.
 
Top Bottom