From: naruse@... Date: 2014-08-15T16:13:48+00:00 Subject: [ruby-core:64393] [ruby-trunk - Feature #10138] [Rejected] Access monotonic counter in Time Issue #10138 has been updated by Yui NARUSE. Status changed from Open to Rejected Aki Tuomi wrote: > Eric Wong wrote: > > cmouse@cmouse.fi wrote: > > > time-s-monotonic.patch (2.07 KB) > > > > It might be better to put the OS compatibility code in the existing > > Process.clock_gettime implementation > > Not sure. It is not same as clock_gettime, which accepts parameters and such, and it is not clock_gettime across operating systems. > > Also, the point of this patch is to enable access to uniform monotonic clock, so that you don't need to check for OS, what clock you want etc. Process.clock_gettime is simply method exposure, and I would think most people would not appreciate that on OS/X or Windows it does something completely different. Process.clock_gettime already have compatibility layer for OS X and Windows. Therefore Process.clock_gettime(Process::CLOCK_MONOTONIC) is portable ---------------------------------------- Feature #10138: Access monotonic counter in Time https://bugs.ruby-lang.org/issues/10138#change-48355 * Author: Aki Tuomi * Status: Rejected * Priority: Normal * Assignee: * Category: core * Target version: ---------------------------------------- Provide API access to guaranteed monotonic counter on underlying operating system. Supports Windows XP and later, OS/X, any linux with clock_gettime. ---Files-------------------------------- time-s-monotonic.patch (2.07 KB) -- https://bugs.ruby-lang.org/