3 with Ada
.Real_Time
.Timing_Events
;
4 use Ada
.Real_Time
, Ada
.Real_Time
.Timing_Events
;
6 procedure Timer_Cancel
is
12 procedure Trigger
(Event
: in out Timing_Event
);
15 protected body Dummy
is
16 procedure Trigger
(Event
: in out Timing_Event
) is
23 Set_Handler
(E
, Time_Last
, Dummy
.Trigger
'Unrestricted_Access);
25 if Time_Of_Event
(E
) /= Time_Last
then
26 raise Program_Error
with "Event time not set correctly";
29 Cancel_Handler
(E
, C
);
32 raise Program_Error
with "Event triggered already";
35 if Time_Of_Event
(E
) /= Time_First
then
36 raise Program_Error
with "Event time not reset correctly";