summaryrefslogtreecommitdiff
path: root/gcc/ada/a-caldel.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/a-caldel.adb')
-rw-r--r--gcc/ada/a-caldel.adb32
1 files changed, 29 insertions, 3 deletions
diff --git a/gcc/ada/a-caldel.adb b/gcc/ada/a-caldel.adb
index bada6b4c7bc..9a5aa29a1ce 100644
--- a/gcc/ada/a-caldel.adb
+++ b/gcc/ada/a-caldel.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- $Revision: 1.37 $
+-- $Revision$
-- --
-- Copyright (C) 1991-2001 Florida State University --
-- --
@@ -41,6 +41,12 @@ with System.OS_Primitives;
with System.Soft_Links;
-- Used for Timed_Delay
+with System.Traces;
+-- Used for Send_Trace_Info
+
+with System.Parameters;
+-- used for Runtime_Traces
+
package body Ada.Calendar.Delays is
package OSP renames System.OS_Primitives;
@@ -48,6 +54,8 @@ package body Ada.Calendar.Delays is
use type SSL.Timed_Delay_Call;
+ use System.Traces;
+
-- Earlier, the following operations were implemented using
-- System.Time_Operations. The idea was to avoid sucking in the tasking
-- packages. This did not work. Logically, we can't have it both ways.
@@ -68,8 +76,16 @@ package body Ada.Calendar.Delays is
procedure Delay_For (D : Duration) is
begin
+ if System.Parameters.Runtime_Traces then
+ Send_Trace_Info (W_Delay, D);
+ end if;
+
SSL.Timed_Delay.all (Duration'Min (D, OSP.Max_Sensible_Delay),
- OSP.Relative);
+ OSP.Relative);
+
+ if System.Parameters.Runtime_Traces then
+ Send_Trace_Info (M_Delay, D);
+ end if;
end Delay_For;
-----------------
@@ -77,8 +93,18 @@ package body Ada.Calendar.Delays is
-----------------
procedure Delay_Until (T : Time) is
+ D : constant Duration := To_Duration (T);
+
begin
- SSL.Timed_Delay.all (To_Duration (T), OSP.Absolute_Calendar);
+ if System.Parameters.Runtime_Traces then
+ Send_Trace_Info (WU_Delay, D);
+ end if;
+
+ SSL.Timed_Delay.all (D, OSP.Absolute_Calendar);
+
+ if System.Parameters.Runtime_Traces then
+ Send_Trace_Info (M_Delay, D);
+ end if;
end Delay_Until;
--------------------