Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] using rusage
- Date: Fri, 20 Jun 2008 09:19:47 +0900
- From: Curt Sampson <cjs@example.com>
- Subject: Re: [tlug] using rusage
- References: <78d7dd350806181930i6acda17co682c322d3a7872af@mail.gmail.com> <20080619035005.GB11561@lucky.cynic.net> <78d7dd350806190155k328d24bcjcf61cb707c42045c@mail.gmail.com> <20080619114706.GA15943@lucky.cynic.net> <d8fcc0800806191638u4afa8ac9v62409fe0305ad233@mail.gmail.com>
- User-agent: Mutt/1.5.17 (2007-11-01)
On 2008-06-20 08:38 +0900 (Fri), Josh Glover wrote: > 2. Use nanosleep(2) instead of sleep(2). nanosleep(2) correctly > handles signals, and will get you closer to 1.0 seconds than sleep(2) > will. What's the difference in the signal handling? From the BSD manpages, it looks as if both treat signals in the same way. And why do you think nanosleep will get you closer than sleep? Neither guarantees any more than you'll sleep at least as long as requested. Note that this: > Therefore, nanosleep() pauses always for at least the specified time, > however it can take up to 10 ms longer than specified until the > process becomes runnable again. does not actually mean that, once you're runnable, you'll actually run. On a very busy system, it could easily be hundreds of ms., or even even thousands, if you're swapped out, after that time that you actually run again. cjs -- Curt Sampson <cjs@example.com> +81 90 7737 2974 Mobile sites and software consulting: http://www.starling-software.com
- Follow-Ups:
- Re: [tlug] using rusage
- From: Edward Middleton
- Re: [tlug] using rusage
- From: Josh Glover
- References:
- [tlug] using rusage
- From: Hung Nguyen Vu
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Hung Nguyen Vu
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Josh Glover
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] First FF3.0 bug? F6 doesn't work
- Next by Date: Re: [tlug] Re: [Was: iptables] Forward multicats
- Previous by thread: Re: [tlug] using rusage
- Next by thread: Re: [tlug] using rusage
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links