Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Nobody <nobody@nowhere.com> |
|---|---|
| Subject | Re: Question of throttling CPU usage |
| Date | 2012-04-26 14:33 +0100 |
| Message-Id | <pan.2012.04.26.13.33.31.515000@nowhere.com> |
| Newsgroups | comp.lang.c |
| References | (2 earlier) <4384689a-5010-4a41-94eb-a747dad00f6d@j3g2000vba.googlegroups.com> <4F9857B3.3080402@verizon.net> <4543ab86-aafd-4500-94f3-0fd954c2de51@f5g2000vbt.googlegroups.com> <9vrclmFi68U11@mid.individual.net> <0c88c621-fe73-4530-beda-50b52b0c504f@l3g2000vbv.googlegroups.com> |
| Organization | Zen Internet |
On Thu, 26 Apr 2012 01:41:06 -0700, jon.harding wrote: > OK, and I am sorry to labour the point here, but how can I do this > outside the application then? > > Here are the requirements: > 1. My program will run hopefully on Windows and Linux. > 2. My program should run at a set CPU percentage and not exceed it. > 3. The CPU percentage may be different depending on the time of day; > ie after 6pm and over a lunch break 12:30 - 1:00pm it will run at 85% > utilization, but at other times around 10% You'll probably have to do it within the application, using platform-specific functionality (e.g. sleep, usleep or nanosleep on Unix, Sleep on Windows). Very few real programs can be written using only the functionality provided by the library. E.g. almost all file handling is platform-specific: even with <stdio.h>, the standard doesn't specify which filenames are valid, and the standard makes no mention of directories.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Question of throttling CPU usage jon.harding@gmx.co.uk - 2012-04-25 11:22 -0700
Re: Question of throttling CPU usage James Kuyper <jameskuyper@verizon.net> - 2012-04-25 14:44 -0400
Re: Question of throttling CPU usage jon.harding@gmx.co.uk - 2012-04-25 12:35 -0700
Re: Question of throttling CPU usage Thomas Richter <thor@math.tu-berlin.de> - 2012-04-25 21:39 +0200
Re: Question of throttling CPU usage James Kuyper <jameskuyper@verizon.net> - 2012-04-25 15:59 -0400
Re: Question of throttling CPU usage jon.harding@gmx.co.uk - 2012-04-25 15:33 -0700
Re: Question of throttling CPU usage Ian Collins <ian-news@hotmail.com> - 2012-04-26 10:37 +1200
Re: Question of throttling CPU usage jon.harding@gmx.co.uk - 2012-04-26 01:41 -0700
Re: Question of throttling CPU usage Robert Wessel <robertwessel2@yahoo.com> - 2012-04-26 04:25 -0500
Re: Question of throttling CPU usage James Kuyper <jameskuyper@verizon.net> - 2012-04-26 06:59 -0400
Re: Question of throttling CPU usage Robert Miles <milesrf@Usenet-News.net> - 2012-05-27 23:35 -0500
Re: Question of throttling CPU usage Nobody <nobody@nowhere.com> - 2012-04-26 14:33 +0100
Re: Question of throttling CPU usage Fred K <fred.l.kleinschmidt@gmail.com> - 2012-04-26 07:44 -0700
Re: Question of throttling CPU usage James Kuyper <jameskuyper@verizon.net> - 2012-04-26 11:45 -0400
Re: Question of throttling CPU usage Nobody <nobody@nowhere.com> - 2012-04-26 14:27 +0100
Re: Question of throttling CPU usage tom st denis <tom@iahu.ca> - 2012-04-26 12:01 -0700
Re: Question of throttling CPU usage Robert Miles <milesrf@Usenet-News.net> - 2012-05-27 23:19 -0500
Re: Question of throttling CPU usage Lanarcam <lanarcam1@yahoo.fr> - 2012-04-25 21:39 +0200
csiph-web