~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to fpcdocs/bunixex/ex72.pp

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
program example72;
 
2
 
 
3
{ Program to demonstrate the NanoSleep function. }
 
4
 
 
5
uses BaseUnix;
 
6
 
 
7
Var
 
8
  Req,Rem : TimeSpec;
 
9
  Res : Longint;
 
10
 
 
11
begin
 
12
  With Req do
 
13
    begin
 
14
    tv_sec:=10;
 
15
    tv_nsec:=100;
 
16
    end;
 
17
  Write('NanoSleep returned : ');
 
18
  Flush(Output);
 
19
  Res:=(fpNanoSleep(@Req,@rem));
 
20
  Writeln(res);
 
21
  If (res<>0) then
 
22
    With rem do
 
23
      begin
 
24
      Writeln('Remaining seconds     : ',tv_sec);
 
25
      Writeln('Remaining nanoseconds : ',tv_nsec);
 
26
      end;
 
27
end.
 
 
b'\\ No newline at end of file'