Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com From: "Alex Vinokur" Subject: System call which gets CPU utilized capacity Date: Wed, 10 Sep 2003 11:26:51 +0300 Lines: 27 Message-ID: X-Complaints-To: usenet AT sea DOT gmane DOT org X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Is there in CYGWIN 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 ===================================== -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/