Page 1 of 1

ElapsedMilliseconds() returns negative value

Posted: Sun Aug 07, 2005 12:04 am
by pantsonhead
I noticed that ElapsedMilliseconds() returns negative value in OSX but not on my PC.
Is it a negative value on purpose or a type/sign problem?

Code: Select all

For i = 1 To 100
  Delay(100)
  Debug Str(i)+" "+Str(ElapsedMilliseconds())
Next
I assume it returns a positive int on Linux and AmigaOS platforms.

Posted: Thu Jan 26, 2006 4:21 pm
by Fred
It's now corrected.

Posted: Thu Jan 26, 2006 4:23 pm
by blueznl
fred, isn't a wraparound possible? i assume you're reading one of the 32 bit counters?

Posted: Thu Jan 26, 2006 4:25 pm
by Fred
no, it's not possible as the counter is reseted at every program launch, and can hold 2^31 milliseconds. Just do the calc :).