mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 09:19:39 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			379 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			379 B
		
	
	
	
		
			ObjectPascal
		
	
	
	
	
	
Program Example59;
 | 
						|
 | 
						|
{ Program to demonstrate the Alarm function. }
 | 
						|
 | 
						|
Uses oldlinux;
 | 
						|
 | 
						|
Procedure AlarmHandler(Sig : longint);cdecl;
 | 
						|
 | 
						|
begin
 | 
						|
  Writeln ('Got to alarm handler');
 | 
						|
end;
 | 
						|
 | 
						|
begin
 | 
						|
  Writeln('Setting alarm handler');
 | 
						|
  Signal(SIGALRM,@AlarmHandler);
 | 
						|
  Writeln ('Scheduling Alarm in 10 seconds');
 | 
						|
  Alarm(10);
 | 
						|
  Writeln ('Pausing');
 | 
						|
  Pause;
 | 
						|
  Writeln ('Pause returned');
 | 
						|
end.
 |