DEADSOFTWARE

add utility cpmake
[cpc.git] / src / cpfront / linux / 486 / Posix / Mod / Ctime.cp
1 MODULE PosixCtime ['time.h'];
3 (* generated by genposix.sh, do not modify *)
5 IMPORT SYSTEM, PosixCtypes, PosixCsys_types, PosixClocale;
7 TYPE
8 char* = PosixCtypes.char;
9 signed_char* = PosixCtypes.signed_char;
10 unsigned_char* = PosixCtypes.unsigned_char;
11 short* = PosixCtypes.short;
12 short_int* = PosixCtypes.short_int;
13 signed_short* = PosixCtypes.signed_short;
14 signed_short_int* = PosixCtypes.signed_short_int;
15 unsigned_short* = PosixCtypes.unsigned_short;
16 unsigned_short_int* = PosixCtypes.unsigned_short_int;
17 int* = PosixCtypes.int;
18 signed* = PosixCtypes.signed;
19 signed_int* = PosixCtypes.signed_int;
20 unsigned* = PosixCtypes.unsigned;
21 unsigned_int* = PosixCtypes.unsigned_int;
22 long* = PosixCtypes.long;
23 long_int* = PosixCtypes.long_int;
24 signed_long* = PosixCtypes.signed_long;
25 signed_long_int* = PosixCtypes.signed_long_int;
26 unsigned_long* = PosixCtypes.unsigned_long;
27 unsigned_long_int* = PosixCtypes.unsigned_long_int;
28 long_long* = PosixCtypes.long_long;
29 long_long_int* = PosixCtypes.long_long_int;
30 signed_long_long* = PosixCtypes.signed_long_long;
31 signed_long_long_int* = PosixCtypes.signed_long_long_int;
32 unsigned_long_long* = PosixCtypes.unsigned_long_long;
33 unsigned_long_long_int* = PosixCtypes.unsigned_long_long_int;
34 float* = PosixCtypes.float;
35 double* = PosixCtypes.double;
36 long_double* = PosixCtypes.long_double;
38 TYPE
39 clock_t* = PosixCsys_types.clock_t;
40 size_t* = PosixCsys_types.size_t;
41 time_t* = PosixCsys_types.time_t;
42 pid_t* = PosixCsys_types.pid_t;
44 TYPE
45 timer_t* = PosixCsys_types.timer_t;
46 clockid_t* = PosixCsys_types.clockid_t;
48 TYPE
49 locale_t* = PosixClocale.locale_t;
51 TYPE
52 Pstruct_tm* = POINTER TO struct_tm;
53 struct_tm* ['struct tm'] = RECORD [noalign] (* 44 *)
54 tm_sec*: int; (* 0+4 *)
55 tm_min*: int; (* 4+4 *)
56 tm_hour*: int; (* 8+4 *)
57 tm_mday*: int; (* 12+4 *)
58 tm_mon*: int; (* 16+4 *)
59 tm_year*: int; (* 20+4 *)
60 tm_wday*: int; (* 24+4 *)
61 tm_yday*: int; (* 28+4 *)
62 tm_isdst*: int; (* 32+4 *)
63 END;
65 TYPE
66 Pstruct_timespec* = POINTER TO struct_timespec;
67 struct_timespec* ['struct timespec'] = RECORD [noalign] (* 8 *)
68 tv_sec*: time_t; (* 0+4 *)
69 tv_nsec*: long; (* 4+4 *)
70 END;
72 TYPE
73 Pstruct_itimerspec* = POINTER TO struct_itimerspec;
74 struct_itimerspec* ['struct itimerspec'] = RECORD [noalign] (* 16 *)
75 it_interval*: struct_timespec; (* 0+8 *)
76 it_value*: struct_timespec; (* 8+8 *)
77 END;
79 CONST
80 CLOCKS_PER_SEC* = 1000000;
82 CONST
83 CLOCK_MONOTONIC* = 1;
84 CLOCK_PROCESS_CPUTIME_ID* = 2;
85 CLOCK_REALTIME* = 0;
86 CLOCK_THREAD_CPUTIME_ID* = 3;
88 CONST
89 TIMER_ABSTIME* = 1;
91 PROCEDURE [ccall] asctime* (IN tm: struct_tm): POINTER TO ARRAY [untagged] OF SHORTCHAR;
92 PROCEDURE [ccall] asctime_r* (IN tm: struct_tm; buf: POINTER TO ARRAY [untagged] OF SHORTCHAR): POINTER TO ARRAY [untagged] OF SHORTCHAR;
93 PROCEDURE [ccall] clock* (): clock_t;
94 PROCEDURE [ccall] clock_getcpuclockid* (pid: pid_t; VAR clock_id: clockid_t): int;
95 PROCEDURE [ccall] clock_getres* (clk_id: clockid_t; VAR res: struct_timespec): int;
96 PROCEDURE [ccall] clock_gettime* (clk_id: clockid_t; VAR res: struct_timespec): int;
97 PROCEDURE [ccall] clock_nanosleep* (clock_id: clockid_t; falgs: int; IN [nil] rqtp: struct_timespec; VAR [nil] rmtp: struct_timespec): int;
98 PROCEDURE [ccall] clock_settime* (clk_id: clockid_t; IN res: struct_timespec): int;
99 PROCEDURE [ccall] ctime* (VAR timep: time_t): POINTER TO ARRAY [untagged] OF SHORTCHAR;
100 PROCEDURE [ccall] ctime_r* (VAR timep: time_t; buf: POINTER TO ARRAY [untagged] OF SHORTCHAR): POINTER TO ARRAY [untagged] OF SHORTCHAR;
101 PROCEDURE [ccall] difftime* (time0, time1: time_t): double;
102 PROCEDURE [ccall] getdate* (IN string: ARRAY [untagged] OF SHORTCHAR): Pstruct_tm;
103 PROCEDURE [ccall] gmtime* (VAR timep: time_t): Pstruct_tm;
104 PROCEDURE [ccall] gmtime_r* (VAR timep: time_t; VAR result: struct_tm): Pstruct_tm;
105 PROCEDURE [ccall] localtime* (VAR timep: time_t): Pstruct_tm;
106 PROCEDURE [ccall] localtime_r* (VAR timep: time_t; VAR result: struct_tm): Pstruct_tm;
107 PROCEDURE [ccall] mktime* (VAR tm: struct_tm): time_t;
108 PROCEDURE [ccall] nanosleep* (IN [nil] rqtp: struct_timespec; VAR [nil] rmtp: struct_timespec): int;
109 PROCEDURE [ccall] strftime* (VAR s: ARRAY [untagged] OF SHORTCHAR; max: size_t; IN format: ARRAY [untagged] OF SHORTCHAR; IN tm: struct_tm): size_t;
110 PROCEDURE [ccall] strftime_l* (VAR s: ARRAY [untagged] OF SHORTCHAR; max: size_t; IN format: ARRAY [untagged] OF SHORTCHAR; IN tm: struct_tm; locale: locale_t): size_t;
111 PROCEDURE [ccall] strptime* (IN s, format: ARRAY [untagged] OF SHORTCHAR; VAR tm: struct_tm): POINTER TO ARRAY [untagged] OF SHORTCHAR;
112 PROCEDURE [ccall] time* (VAR [nil] tloc: time_t): time_t;
113 PROCEDURE [ccall] timer_delete* (timerid: timer_t): int;
114 PROCEDURE [ccall] timer_getoverrun* (timerid: timer_t): int;
115 PROCEDURE [ccall] timer_gettime* (timerid: timer_t; VAR value: struct_itimerspec): int;
116 PROCEDURE [ccall] timer_settime* (timerid: timer_t; flags: int; IN value: struct_itimerspec; VAR [nil] ovalue: struct_itimerspec): int;
117 PROCEDURE [ccall] tzset* ;
119 END PosixCtime.