in reply to Using module with c code in perl program.
In the perl portion, I think this line:
should be this:$elapsed_c = tv_interval($start_time,$end_time);
and$elapsed_c = tv_interval($start_time_c,$end_time_c);
should be:$elapsed_perl = tv_interval($start_time,$end_time);
Note that $start_time and $end_time are never declared, nor initialized, and a "use strict;" at the top would have helped you spot this.$elapsed_perl = tv_interval($start_time_perl,$end_time_perl);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Using module with c code in perl program.
by k0shinus (Novice) on Dec 22, 2015 at 08:36 UTC |
In Section
Seekers of Perl Wisdom