Issue #7500 has been reported by tmm1 (Aman Gupta).

----------------------------------------
Bug #7500: Improve GC profiler timings on linux
https://bugs.ruby-lang.org/issues/7500

Author: tmm1 (Aman Gupta)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 2.0.0
ruby -v: ruby 2.0.0dev (2012-12-03 trunk 38149) [x86_64-darwin12.2.0]


On linux kernels, getrusage()'s precision depends on the value of HZ when the kernel was compiled. By default, HZ=250 provides a 4ms granularity.

This patch uses clock_gettime() with CLOCK_PROCESS_CPUTIME_ID when available, which provides a 1ns precision on linux.


-- 
http://bugs.ruby-lang.org/