Thread: sleep()
View Single Post
  #26   Spotlight this post!  
Unread 23-02-2004, 22:22
mtrawls's Avatar
mtrawls mtrawls is offline
I am JVN! (John von Neumann)
#0122 (NASA Knights)
Team Role: Programmer
 
Join Date: Mar 2003
Location: Hampton, VA
Posts: 295
mtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to beholdmtrawls is a splendid one to behold
Send a message via AIM to mtrawls
Re: sleep()

Quote:
Originally Posted by KenWittlief
BTW - if you are looking at timing be sure to comment out all your printf statements - there seems to be a whole library of code behind them, I think they will make a drastic reduction in your loop speed.
I can say from experience that the printf libraries do make a difference. All the "horror" stories my SICP instructor told me a couple of years ago about debug statements causing or removing bugs (the act of observing disturbs the observed?) have come true. Using the timing interrupts and for our auton code (on the EduBot at least), I've come across situations where putting a printf statement causes problems .. and then where it removes them. Needless to say, it was a pain figuring out that the printf statement caused it -- luckily my old teacher had warned me, or I wouldn't have even thunk it.