Ada Programming/Keywords/delay

Delay statements

Relative delays

delay Wait_Time;

The Ravenscar profile forbids the use of the relative delay statement:

pragma Restrictions (No_Relative_Delay)

This language feature is only available in Ada 2005.

Absolute delays

delay until Next_Time;
↑Jump back a section

Select statements

Delay alternative

Selective accept:

select
   when Cond =>
      accept_statement
      statements
or
  delay_alternative
end select;

Timed entry call

select
   entry_call_alternative
or
   delay_alternative
end select;

Asynchronous transfer of control

select
   delay until Abort_Time;
   statements
then abort
   abortable_part
end select;
↑Jump back a section
Last modified on 27 February 2012, at 20:47