1 --- ./cpuspeed-1.2.1/cpuspeed.cc~ 2005-04-06 15:04:28.000000000 -0300
2 +++ ./cpuspeed-1.2.1/cpuspeed.cc 2005-04-06 15:12:55.000000000 -0300
4 unsigned current_speed; // current speed step
5 unsigned last_step; // lowest speed step
7 +// whether to account nice time as user time (true) or idle time (false)
8 +bool include_nice = false;
10 // which CPU are we controlling
14 &system_time, &idle_time, &wait_time
17 - // count nice time as idle time
18 - idle_time += nice_time;
20 + idle_time += nice_time;
22 + user_time += nice_time;
24 // count IO wait time as idle time
25 idle_time += wait_time;
27 fprintf(stderr, "CPU interval is %u\n", interval);
30 + else if(!strcmp(argv[i], "-n"))
31 + include_nice = true;
32 else if(!strcmp(argv[i], "-p"))
36 " Sets the interval between idle percentage tests and possible speed\n"
37 " changes in tenths of a second (default is 20).\n"
40 + " Includes nice time as cpu time (off by default)\n"
42 " -p <fast up> <threshold>\n"
43 " Sets the CPU idle percentage thresholds. <fast up> is the idle\n"
44 " percentage below which a CPU will be set to the highest possible\n"
45 --- ./cpuspeed-1.2.1/cpuspeed.conf~ 2005-04-06 15:11:46.000000000 -0300
46 +++ ./cpuspeed-1.2.1/cpuspeed.conf 2005-04-06 15:11:52.000000000 -0300
48 # uncomment this and set to the name of your CPUFreq module
51 +# Let background (nice) processes speed up the cpu
54 # Add your favorite options here
55 #OPTS="$OPTS -s 0 -i 10 -r"