negative millisecs?

BlitzMax Forums/BlitzMax Programming/negative millisecs?

Kernle 32DLL_2(Posted 2005) [#1]
hi

i hve a problem with millisecs().I did this
graphics 800,600,0

while not keydown(1)
cls
ms=millisecs()
drawtext ms,0,0
flip
wend 

so i got numbers like -1043464591.
how is that possible? I think millisecs is the time since the startup?


FlameDuck(Posted 2005) [#2]
I think millisecs is the time since the startup?
From what I understand it is time since the program started + an arbitrary number (so people can still use it to seed the random number generator).

Anyway - you're getting a negative number because you're trying to represent an unsigned value in a variable interpreted as a signed (2's compliment) number. As long as you're using "delta" values it doesn't effect you.