From: Tanaka Akira Date: 2013-07-24T10:50:31+09:00 Subject: [ruby-core:56135] Re: [ruby-trunk - Feature #8658] Process.clock_gettime 2013/7/24 KOSAKI Motohiro : > So, Why do you choice Process.clock_gettime() instead of > Time.clock_gettime()? I don't like the result value of clock_gettime(CLOCK_REALTIME) because the value is interpreted differently between systems which use leapseconds and not. Time.now should be used instead. The patch defines Process::CLOCK_REALTIME but it is just for consistency. I felt definining CLOCK_* constants except CLOCK_REALTIME is too inconsistent. The expected my main usecase would be CLOCK_PROCESS_CPUTIME_ID (or CLOCK_THREAD_CPUTIME_ID). For example, I use Process.times for measure Bignum speed but Process.times cannot measure under 10ms on my environment. Repeating target operation (as I do) improves precision but high resolution clocks can be used to obtain similar precision with less repeatation. -- Tanaka Akira