🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #339

usleep and efficiency

#339
From: Richard Myers
Date: Thu, 30 Jul 1992 06:20
16 lines
1059 bytes
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
Technical Details
Message-ID: <2A778A16.26787@noiro.acs.uci.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!noiro.acs.uci.edu!dec5200.acs.uci.edu!rmyers

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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