2015-11-30 timeout <? for( $timeout=time()+60; time()<$timeout; sleep(3) ){ $status = getStatus(); if( $status!=END ) break; }