getrusage vs clock

Torbjörn Granlund tg at
Thu Jan 21 11:47:58 UTC 2016

paul zimmermann <Paul.Zimmermann at> writes:

  since version 2.18 of the glibc, the clock() function is much more precise.
  For example on my machine it has a resolution of 1 micro-seconds whereas
  getrusage() has a resolution of 4ms only, as demonstrated by the program
I believe we already use clock_gettime(2) directly on GNU/Linux, which
is the underlying syscall that clock(3) uses in newer GNU libc versions.

Does that not happen in your tests?

Please encrypt, key id 0xC8601622

More information about the gmp-devel mailing list