Subj : Re: nptl threads execution time To : comp.programming.threads From : loic-dev Date : Wed Apr 13 2005 03:38 am Salut Daniel, > According to available info it seems that it should do what I need... > > >This quite new function, standardized by SUSv3, is available on FC3. > > ...may be its defined but not implemented (glibc-2.3.4-2.fc3, kernel-2.6.10-hrt) > > /usr/include/bits/time.h:# define CLOCK_THREAD_CPUTIME_ID 3 > > clock_getrestest.c,83:clock_getres(CLOCK_THREAD_CPUTIME_ID, &ts): Invalid argument > The following program compiles and runs fine on my FC3 ! I have the vanilla glibc shipped with FC3, namely glibc 2.3.4. Cheers, Loic. /* res.c compile: on FC3 with: gcc -W -Wall res.c -lrt -o res execute: bash$ ./res */ #include #include #include #include int main() { struct timespec ts; assert ( clock_getres(CLOCK_THREAD_CPUTIME_ID, &ts)==0 ); printf ("resolution = %ld.%09ld s\n", ts.tv_sec, ts.tv_nsec); return 0; } .