LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   POSIX.4 clock_gettime function (https://www.linuxquestions.org/questions/programming-9/posix-4-clock_gettime-function-10521/)

collinss 12-22-2001 09:11 AM

POSIX.4 clock_gettime function
 
I am trying to use the clock_gettime function but I get an "undefined reference" error when building. I have included time.h, my computer is POSIX.1 and POSIX.4 compliant, and _POSIX_TIMERS is defined. What am I missing or what else do I need to verify?

trickykid 12-22-2001 01:00 PM

double post.. please try to refrain from double posting. http://www.linuxquestions.org/questi...threadid=10522

karthiks 09-13-2005 06:55 AM

clock_gettime error
 
append -lrt to the gcc commandline. seems clock_* are in a library called 'librt'


All times are GMT -5. The time now is 03:06 AM.