summaryrefslogtreecommitdiff
path: root/fpcdocs/olinuxex/ex15.pp
blob: f13428ea9c865c97aadbad1a5eea409261ab4f70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Program Example15;

{ Program to demonstrate the Nice and Get/SetPriority functions. }

Uses oldlinux;

begin
  writeln ('Setting priority to 5');
  setpriority (prio_process,getpid,5);
  writeln ('New priority = ',getpriority (prio_process,getpid));
  writeln ('Doing nice 10');
  nice (10);
  writeln ('New Priority = ',getpriority (prio_process,getpid));
end.