Problem with microseconds 
Author Message
 Problem with microseconds

I'm using microseconds to measure the time some code uses in the way

m = microseconds
// code to measure
time_used = microseconds - m

This works fine, but sometimes after several uses the result is garbage
showing a much too big value. I found no other solution than restarting the
Mac. I hope somebody has a better idea.
Peter



Mon, 19 Jan 2004 16:28:58 GMT  
 Problem with microseconds

Quote:

> m = microseconds
> // code to measure
> time_used = microseconds - m

m = microseconds
// code to measure
m = microseconds - m

--
jpB, trs amicalement  ?enlever TAG de l'adresse?
Babel Translator X 1.0  www.chez.com/babeltranslator
Systme expert de traduction Fran?ais <=> Anglais
Conserve le sens du texte et style du traducteur



Mon, 19 Jan 2004 17:25:18 GMT  
 Problem with microseconds



Quote:

> > m = microseconds
> > // code to measure
> > time_used = microseconds - m

> m = microseconds
> // code to measure
> m = microseconds - m

Merci,
je ne parle pas Francais tres bien (and  English neither), so in anglais:
OK, the last line was only a shortcut for "xxx.text = str(microseconds - m).
But why should this help? When I leave the method the local variable m is
destoyed and when I call again m is initialized by the first line.
Peter
Quote:
> jpB, trs amicalement  ?enlever TAG de l'adresse?
> Babel Translator X 1.0  www.chez.com/babeltranslator
> Systme expert de traduction Fran?ais <=> Anglais
> Conserve le sens du texte et style du traducteur



Mon, 19 Jan 2004 19:52:35 GMT  
 Problem with microseconds

But why should this help? When I leave the method the local variable m
is
destoyed and when I call again m is initialized by the first line.

Quote:
>This works fine, but sometimes after several uses the result is garbage
>showing a much too big value.

dim m as double

Quote:
>I found no other solution than restarting >the Mac.

strange, have you another variable global with the same name "m"?

--
jpB, trs amicalement  ?enlever TAG de l'adresse?
Babel Translator X 1.0  www.chez.com/babeltranslator
Systme expert de traduction Fran?ais <=> Anglais
Conserve le sens du texte et style du traducteur



Mon, 19 Jan 2004 23:40:55 GMT  
 Problem with microseconds
Quote:
> strange, have you another variable global with the same name "m"?

No. And if, it should not be a problem, because RB loooks first for local
variables.
cu
Peter



Quote:

> But why should this help? When I leave the method the local variable m
> is
> destoyed and when I call again m is initialized by the first line.

> >This works fine, but sometimes after several uses the result is garbage
> >showing a much too big value.

> dim m as double

> >I found no other solution than restarting >the Mac.

> strange, have you another variable global with the same name "m"?

> --
> jpB, trs amicalement  ?enlever TAG de l'adresse?
> Babel Translator X 1.0  www.chez.com/babeltranslator
> Systme expert de traduction Fran?ais <=> Anglais
> Conserve le sens du texte et style du traducteur



Tue, 20 Jan 2004 17:17:15 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Best method for 8 channel analog control on a microsecond scale

2. sychronized digital/analog output at a microsecond time scale on a PCI 6713 card

3. delay (n microseconds) ???

4. how to delay in microseconds?

5. how to accurately measure microseconds &/ CPU cycles for a period

6. microsecond timer

7. TIP #124: Adding "clock microseconds" Subcommand

8. How to control the looping time of the for loop in 10 microseconds in labview?

9. RCR#U011 Add a method: Time#set(seconds <,microseconds>)

10. Problems, problems, problems

11. Eiffel Problems, Problems, Problems

12. Finn Idiom problems and Re: {rho} problem

 

 
Powered by phpBB® Forum Software