From: Eric Hodel Date: 2004-06-11T12:08:41-07:00 Subject: Re: The dangers of sleeping ... --qhD8kUEc5MK9MdKG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Dale Martenson (dmartenson@multitech.com) wrote: > I guess when I think of sleeping. I don't see the relationship between > sleeping for a particular length of time and what the clock says. This may > be since I work with a lot embedded systems where tick counts are used to > for timing events. Date and time information may or may not be available. >=20 > I just thought it was odd that it wasn't accounted for and that its behav= ior > varied depending on if it was in a thread or not. If you look at sleep(3) you'll find: DESCRIPTION The sleep() function suspends execution of the calling process until either seconds seconds have elapsed or a signal is delivered to the process and its action is to invoke a signal-catching function or to t= er- minate the process. System activity may lengthen the sleep by an inde- terminate amount. (The last sentance is of the most importance.) sleep is implemented this w= ay in most languages because the OS provides no better guarantee for sleep tim= e. --=20 Eric Hodel - drbrain@segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --qhD8kUEc5MK9MdKG Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (FreeBSD) iD8DBQFAygM5MypVHHlsnwQRAoctAJ9cn9R7pjbhW3nQMH2wFkVChZbP+ACgj48y nQAFTay7HL5ddiYf8Vwxfdw= =fP4O -----END PGP SIGNATURE----- --qhD8kUEc5MK9MdKG--