home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / next / programm / 5348 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  1.0 KB

  1. Path: sparky!uunet!usc!noiro.acs.uci.edu!dec5200.acs.uci.edu!rmyers
  2. From: rmyers@dec5200.acs.uci.edu (Richard Myers)
  3. Subject: usleep and efficiency
  4. Nntp-Posting-Host: dec5200.acs.uci.edu
  5. Message-ID: <2A778A16.26787@noiro.acs.uci.edu>
  6. Newsgroups: comp.sys.next.programmer
  7. Organization: University of California, Irvine
  8. Lines: 16
  9. Date: 30 Jul 92 06:20:06 GMT
  10.  
  11. 2 questions
  12. 1. Why does a simple usleep(100000); *HANG* my app?
  13.     Background: The program does a DPSTimedEntry.  Do these conflict?
  14.       also, it only hangs when I have the sound turned on for the app.
  15.       also, it doesn't COMPLETELY hang.  If I'm running from a shell,
  16.       I can send a ^C and it'll continue. (Yes, I'm pretty sure it's
  17.       the usleep from gdb.  No, it's not consistent (takes variable #
  18.       of usleeps to hang))
  19.  
  20. 2. Is there an EASY way of finding out which way to code a line faster.
  21. eg. should I say if 'fabs(x) > 2' or '(x > 2.0) || (x < -2.0)'?  I'd like
  22. a faster way to test this than doing a full profile run!
  23. [BTW, the second way is faster].
  24.  
  25. Thanks,
  26.     Kurt
  27.