A
aaron.devore
I'm trying to use the timersub macro on Ubuntu Linux. When I compile I
get the error:
<file>.c:<line #>: warning: implicit declaration of function
'timersub'
Where <file> is the file name and <line #> is the line number. I take
that to mean I that the timersub macro hasn't been #included. My code
looks about like this:
#include <time.h>
#include <sys/time.h>
struct timeval *time_start, *time_end, *time_diff;
gettimeofday(time_start);
// some stuff runs
gettimeofday(time_end);
timersub(time_start, time_end, time_diff);
What am I doing wrong?
-Aaron
get the error:
<file>.c:<line #>: warning: implicit declaration of function
'timersub'
Where <file> is the file name and <line #> is the line number. I take
that to mean I that the timersub macro hasn't been #included. My code
looks about like this:
#include <time.h>
#include <sys/time.h>
struct timeval *time_start, *time_end, *time_diff;
gettimeofday(time_start);
// some stuff runs
gettimeofday(time_end);
timersub(time_start, time_end, time_diff);
What am I doing wrong?
-Aaron