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