require '_h2ph_pre.ph';

no warnings 'redefine';

unless(defined(&_RF__RF_TIMER_H_)) {
    eval 'sub _RF__RF_TIMER_H_ () {1;}' unless defined(&_RF__RF_TIMER_H_);
    require 'rf_options.ph';
    require 'rf_utils.ph';
    require 'sys/time.ph';
    if(defined( &_KERNEL)) {
	require 'sys/kernel.ph';
	eval 'sub RF_ETIMER_START {
	    my($_t_) = @_;
    	    eval q( &do {  &bzero(($_t_), $sizeof{$_t_});  &getmicrouptime(($_t_). &st); }  &while (0));
	}' unless defined(&RF_ETIMER_START);
	eval 'sub RF_ETIMER_STOP {
	    my($_t_) = @_;
    	    eval q( &do {  &getmicrouptime(($_t_). &et); }  &while (0));
	}' unless defined(&RF_ETIMER_STOP);
	eval 'sub RF_ETIMER_EVAL {
	    my($_t_) = @_;
    	    eval q( &do {  &RF_TIMEVAL_DIFF(($_t_). &st, ($_t_). &et, ($_t_). &diff); }  &while (0));
	}' unless defined(&RF_ETIMER_EVAL);
	eval 'sub RF_ETIMER_VAL_US {
	    my($_t_) = @_;
    	    eval q(( &RF_TIMEVAL_TO_US(($_t_). &diff)));
	}' unless defined(&RF_ETIMER_VAL_US);
	eval 'sub RF_ETIMER_VAL_MS {
	    my($_t_) = @_;
    	    eval q(( &RF_TIMEVAL_TO_US(($_t_). &diff)/1000));
	}' unless defined(&RF_ETIMER_VAL_MS);
    }
}
1;
