This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ping2][PATCH v2][BZ #12515] Improve precision of clock function


> +  if (__clock_gettime (CLOCK_PROCESS_CPUTIME_ID, &ts) == 0)
> +    return (ts.tv_sec * CLOCKS_PER_SEC
> +	    + ts.tv_nsec / (1000000000 / CLOCKS_PER_SEC));
> +
> +  /* clock_gettime failed.  This will only occur if CLOCK_PROCESS_CPUTIME_ID is
> +     not supported by the kernel.  Fall back to __times.  */

This is fine for now.  But we already assume that CLOCK_PROCESS_CPUTIME_ID
is actually supported in the kernel.  So the fallback code here should be
removed at some point.


Thanks,
Roland


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]