delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/09/10/04:32:27

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: "Alex Vinokur" <alexvn AT bigfoot DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: System call which gets CPU utilized capacity
Date: Wed, 10 Sep 2003 11:26:57 +0300
Lines: 26
Message-ID: <bjmnbm$kjlk7$1@ID-79865.news.uni-berlin.de>
NNTP-Posting-Host: pop03-2-ras5-p136.barak.net.il (212.150.100.136)
X-Trace: news.uni-berlin.de 1063182520 21616263 212.150.100.136 (16 [79865])
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Is there in DJGPP any system call which gets CPU utilized capacity at the present moment?
For instance :
int get_cpu_usage() which returns the percentage of used capacity.

I would like to write in my C-program something like :

if (get_cpu_usage() < 20)
{
   foo1();  // calling foo1() will be postponed
}
else
{
   foo2();
}

--
   =====================================
   Alex Vinokur
     mailto:alexvn AT connect DOT to
     http://mathforum.org/library/view/10978.html
   =====================================





- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019