time_out/3: Give every alternative the full timeout time #86
This commit is contained in:
		
				
					committed by
					
						
						Costa Vitor
					
				
			
			
				
	
			
			
			
						parent
						
							f9342e835d
						
					
				
				
					commit
					c2bd671bfd
				
			@@ -29,13 +29,13 @@ time_out(Goal, Time, Result) :-
 | 
				
			|||||||
	T is Time//1000,
 | 
						T is Time//1000,
 | 
				
			||||||
	UT is (Time mod 1000)*1000,
 | 
						UT is (Time mod 1000)*1000,
 | 
				
			||||||
	catch( ( Result0 = success,
 | 
						catch( ( Result0 = success,
 | 
				
			||||||
	       	 setup_call_cleanup(
 | 
						         setup_call_cleanup(
 | 
				
			||||||
			alarm(T.UT,throw(time_out),_),
 | 
								alarm(T.UT,throw(time_out),_),
 | 
				
			||||||
			Goal,
 | 
								Goal,
 | 
				
			||||||
			alarm(0,_,RT)),
 | 
								alarm(0,_,RT)),
 | 
				
			||||||
		 (  var(RT)
 | 
							 (  var(RT)
 | 
				
			||||||
		 -> alarm(0,_,RT),
 | 
							 -> alarm(0,_,_),
 | 
				
			||||||
		    ( true ; alarm(RT,throw(time_out),_) )
 | 
							    ( true ; alarm(T.UT,throw(time_out),_) )
 | 
				
			||||||
		 ;  true
 | 
							 ;  true
 | 
				
			||||||
		 )
 | 
							 )
 | 
				
			||||||
	       ),
 | 
						       ),
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user