[BMax 1.50] Does MilliSecs() return Int or Long?

Started by Adam Novagen, December 13, 2019, 17:43:55

Previous topic - Next topic

Adam Novagen

Title says it all. This is such a hilariously simple question I almost feel dumb for asking, but I can't for the life of me find any indication of what value MilliSecs() returns. I'm just looking to make a totally accurate playtime calculator for my engine, but obviously I need to account for the possibility of MilliSecs() looping into the negatives, which means I need to know its maximum range.
We all know the main problem with dictionaries is that they contain too many words, and not enough butterscotch sauce!

_PJ_

It returns an Integer
However, it can be passed to a Long in 64-bit

Adam Novagen

Quote from: _PJ_ on December 13, 2019, 18:22:20
It returns an Integer
However, it can be passed to a Long in 64-bit
Okay. This means that, by default, it will loop at 2147483647, right? i.e. even if I store the value in a Long variable, the initial value returned by MilliSecs() will switch to negative once it passes 2^31?
We all know the main problem with dictionaries is that they contain too many words, and not enough butterscotch sauce!


Adam Novagen

Oooooh, that is an excellent set of Types, will definitely use that. Thanks a million, Ron! Is this your own work?
We all know the main problem with dictionaries is that they contain too many words, and not enough butterscotch sauce!

Derron

This very special function is copied from the source mentioned there. If there is no source mentioned it is most probably my code.


Bye
Ron