time_out/3: Give every alternative the full timeout time #86

This commit is contained in:
Ulrich Neumerkel 2009-05-28 01:15:02 +02:00 committed by Costa Vitor
parent f9342e835d
commit c2bd671bfd
1 changed files with 3 additions and 3 deletions

View File

@ -29,13 +29,13 @@ time_out(Goal, Time, Result) :-
T is Time//1000,
UT is (Time mod 1000)*1000,
catch( ( Result0 = success,
setup_call_cleanup(
setup_call_cleanup(
alarm(T.UT,throw(time_out),_),
Goal,
alarm(0,_,RT)),
( var(RT)
-> alarm(0,_,RT),
( true ; alarm(RT,throw(time_out),_) )
-> alarm(0,_,_),
( true ; alarm(T.UT,throw(time_out),_) )
; true
)
),