From: Tanaka Akira Date: 2013-07-19T10:05:41+09:00 Subject: [ruby-core:56083] Re: [CommonRuby - Feature #8640] Add Time#elapsed to return nanoseconds since creation 2013/7/19 phluid61 (Matthew Kerwin) : > Actually the supplied patch uses clock_gettime(CLOCK_REALTIME), which is already the C equivalent of System.currentTimeMillis(). The only issue is that it allocates a Time object (although it doesn't matter because that happens before the benchmarking commences). Since the getting of the final time and the calculation of the elapsed duration all happen in C-land, there's very little cost involved, even when the numbers are very large. I feel what we need is Process.clock_gettime, as a primitive. -- Tanaka Akira