require '_h2ph_pre.ph';

unless(defined(&_NETISO_TP_TIMER_H_)) {
    eval 'sub _NETISO_TP_TIMER_H_ () {1;}' unless defined(&_NETISO_TP_TIMER_H_);
    eval 'sub SET_DELACK {
        local($t) = @_;
	    eval q({ ($t)-> &tp_flags |=  &TPF_DELACK;  &if (($t)-> &tp_fasttimeo == 0) { ($t)-> &tp_fasttimeo =  &tp_ftimeolist;  &tp_ftimeolist = ($t); } });
    }' unless defined(&SET_DELACK);
    if(defined(&ARGO_DEBUG)) {
	eval 'sub TP_DEBUG_TIMERS () {1;}' unless defined(&TP_DEBUG_TIMERS);
    }
    unless(defined(&TP_DEBUG_TIMERS)) {
	eval 'sub tp_ctimeout {
	    local($tpcb, $which, $timo) = @_;
    	    eval q((($tpcb)-> $tp_timer[$which] = ($timo)));
	}' unless defined(&tp_ctimeout);
	eval 'sub tp_cuntimeout {
	    local($tpcb, $which) = @_;
    	    eval q((($tpcb)-> $tp_timer[$which] = 0));
	}' unless defined(&tp_cuntimeout);
	eval 'sub tp_etimeout () { &tp_ctimeout;}' unless defined(&tp_etimeout);
	eval 'sub tp_euntimeout () { &tp_cuntimeout;}' unless defined(&tp_euntimeout);
	eval 'sub tp_ctimeout_MIN {
	    local($p, $w, $t) = @_;
    	    eval q({  &if(($p)-> $tp_timer[$w] > ($t)) ($p)-> $tp_timer[$w] = ($t);});
	}' unless defined(&tp_ctimeout_MIN);
    }
}
1;
