summaryrefslogtreecommitdiff
path: root/fpcdocs/olinuxex/ex2.pp
blob: 208c5af4340e349bccc1ee245b26e469fe6a8cf6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Program Example2;

{ Program to demonstrate the GetTimeOfDay function. }

Uses oldlinux;

Var TV : TimeVal;
    TZ : TimeZone;

begin
  GetTimeOfDay (TV);
  Writeln ('Seconds              : ',tv.sec);
  Writeln ('Milliseconds         : ',tv.usec);
  Writeln ('Minutes west of GMT  : ',tz.minuteswest);
  Writeln ('Daylight Saving Time : ',tz.dsttime);
  Writeln ('Seconds in 1 call    : ',GetTimeOfDay);
end.