Problem timing execution

Timothy Rost
Fri Jun 11 11:24:00 GMT 1999

I am trying to time the execution of my program to compare the
efficiency of different compilers.  However,  I keep getting error while
trying to compile.

Here is a small bit from my code ...

#include <time.h>
clock_t clk;
clk = clock();

Whenever I add the clk = clock() line I get the following errors during
compilation; otherwise it compiles fine.

/usr/local/m68k-coff/lib/libc.a(timer.o): In function '_times_r':
../../../../../src/newlib/libc/reent/timer.c:63: undefined reference to
/usr/local/m68k-coff/lib/libc.a(timer.o): In function '_gettimeofday_r':
../../../../../src/newlib/libc/reent/timer.c:107: undefined reference to

I'm using gcc-2.8.1, binutils-2.9.1, newlib-1.8.1, and libstdc++-
running of RedHat Linux 5.1

Any ideas would be greatly appreciated.

Timothy Rost
Applied Research Laboratories
The University of Texas at Austin
New CrossGCC FAQ:
To remove yourself from the crossgcc list, send
mail to with the
text 'unsubscribe' (without the quotes) in the
body of the message.

More information about the crossgcc mailing list