File: activeCpu.h

package info (click to toggle)
nws 2.11-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,700 kB
  • ctags: 2,820
  • sloc: ansic: 28,849; sh: 3,289; java: 1,205; makefile: 697; perl: 12
file content (18 lines) | stat: -rwxr-xr-x 672 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* $Id: activeCpu.h,v 1.3 1999/01/11 20:13:50 jhayes Exp $ */

/*
** This module implements a monitor which tests cpu availability through active
** probing.
*/

/*
** Runs a nice #niceValue# process for #testLength# milliseconds to test the
** amount of cpu available.  Sets #available# to the percentage of wall clock
** time during the life of a process that it spends in a CPU, or 0.0 if the
** process is not completed within #maxWait# seconds.  Returns 1 if successful,
** 0 otherwise.
*/
int ActiveCpuGetLoad(unsigned short niceValue,
                     unsigned int maxWait,
                     unsigned int testLength,
                     double *available);