1 ------------------------------------------------------------------------------
3 -- GNAT RUN-TIME COMPONENTS --
5 -- A D A . E X E C U T I O N _ T I M E --
9 -- This specification is derived from the Ada Reference Manual for use with --
10 -- GNAT. In accordance with the copyright of that document, you can freely --
11 -- copy and modify this specification, provided that if you redistribute a --
12 -- modified version, any changes that you have made are clearly indicated. --
14 ------------------------------------------------------------------------------
16 -- This unit is not implemented in typical GNAT implementations that lie on
17 -- top of operating systems, because it is infeasible to implement in such
20 -- If a target environment provides appropriate support for this package
21 -- then the Unimplemented_Unit pragma should be removed from this spec and
22 -- an appropriate body provided.
24 with Ada
.Task_Identification
;
27 package Ada
.Execution_Time
is
30 pragma Unimplemented_Unit
;
32 type CPU_Time
is private;
34 CPU_Time_First
: constant CPU_Time
;
35 CPU_Time_Last
: constant CPU_Time
;
36 CPU_Time_Unit
: constant := 0.000001;
37 CPU_Tick
: constant Ada
.Real_Time
.Time_Span
;
40 (T
: Ada
.Task_Identification
.Task_Id
:=
41 Ada
.Task_Identification
.Current_Task
)
46 Right
: Ada
.Real_Time
.Time_Span
) return CPU_Time
;
49 (Left
: Ada
.Real_Time
.Time_Span
;
50 Right
: CPU_Time
) return CPU_Time
;
54 Right
: Ada
.Real_Time
.Time_Span
) return CPU_Time
;
58 Right
: CPU_Time
) return Ada
.Real_Time
.Time_Span
;
60 function "<" (Left
, Right
: CPU_Time
) return Boolean;
61 function "<=" (Left
, Right
: CPU_Time
) return Boolean;
62 function ">" (Left
, Right
: CPU_Time
) return Boolean;
63 function ">=" (Left
, Right
: CPU_Time
) return Boolean;
67 SC
: out Ada
.Real_Time
.Seconds_Count
;
68 TS
: out Ada
.Real_Time
.Time_Span
);
71 (SC
: Ada
.Real_Time
.Seconds_Count
;
72 TS
: Ada
.Real_Time
.Time_Span
:= Ada
.Real_Time
.Time_Span_Zero
)
75 Interrupt_Clocks_Supported
: constant Boolean := False;
76 Separate_Interrupt_Clocks_Supported
: constant Boolean := False;
78 function Clock_For_Interrupts
return CPU_Time
;
82 type CPU_Time
is new Ada
.Real_Time
.Time
;
84 CPU_Time_First
: constant CPU_Time
:= CPU_Time
(Ada
.Real_Time
.Time_First
);
85 CPU_Time_Last
: constant CPU_Time
:= CPU_Time
(Ada
.Real_Time
.Time_Last
);
87 CPU_Tick
: constant Ada
.Real_Time
.Time_Span
:= Ada
.Real_Time
.Tick
;
89 end Ada
.Execution_Time
;