Below given program produces error:
try.c:(.text+0xf): undefined reference to `clock_gettime’
Please can anybody , tell me how to get this compiled successfully!!!
1 #include <time.h>
2 #include <stdio.h>
3
4 int main(int argc, char * argv)
5 {
6
7 // get starting time
8 struct timespec stop;
9 clock_gettime(CLOCK_REALTIME,&stop);
10
11 return 0;
12 }