The microseconds function returns a double, so you should store the result in a double not an integer.

Notice that 2147483647 is the largest value you can store in an integer.

Malcolm Smith

On Aug 17, 2006, at 4:03 PM, Richard wrote:

My serial response time effort brought up this problem:
(c & d dimed as int)


  c=Microseconds()
  for d=0 to 50000000
  next d
  d=Microseconds()
  break

At the break, both c and d have the same value, even though the for- next delay consumes about 5 seconds.

Then, to add weirdness on top of weirdness, every time I run this I see c=2147483647, and d=2147483647. The numbers never change, but it's supposed to be the number of microseconds since last boot. (If it makes any difference, the code is executed inside a TimerAction.)

Is it just me or does anyone else have this experience?

-Richard

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to