Witam. Chciałem do zmierzenia czasu użyć funkcji gettime, jednak podczas kompilacji wyskakują mi takie errory:
zad1.c:(.text+0x15): undefined reference to clock_gettime' zad1.c:(.text+0x93): undefined reference to
clock_gettime'
Przykładowy sStart i stop:
struct timespec start, stop;
if( clock_gettime( CLOCK_REALTIME, &start) == -1 ) {
perror( "clock gettime" );
exit( EXIT_FAILURE );
}
if( clock_gettime( CLOCK_REALTIME, &stop) == -1 ) {
perror( "clock gettime" );
exit( EXIT_FAILURE );
}