Wednesday, October 2, 2013

Delay People Code

At time we have a requirement of delaying processing for some time.

Below code piece can be used to set the delay.

This code delays processing for 5 seconds. 

method Delay 
   /+ &IBU as String, +/ 
   /+ &item as String +/ 
   Local string &BuExists; 
   Local datetime &current_time, &delay_time; 
   &current_time = %Datetime; 
   &delay_time = AddToDateTime(&current_time, 0, 0, 0, 0, 0, 5); 
   While True 
      If (%Datetime > &delay_time) Then 
         Break; 
      End-If; 
   End-While 
end-method; 

No comments:

Post a Comment