Feature #8777
closedProcess.mach_absolute_time
Description
Hi,
This is related to #8658. mach_absolute_time
will give us a monotonic clock on OS X. I'm not sure if this fits in to clock_gettime
, so I've added a new function for getting the absolute time and another function for converting the absolute time to nanoseconds.
Files
Updated by akr (Akira Tanaka) over 11 years ago
2013/8/11 tenderlovemaking (Aaron Patterson) tenderlove@ruby-lang.org:
Feature #8777: Process.mach_absolute_time
https://bugs.ruby-lang.org/issues/8777
This is related to #8658.
mach_absolute_time
will give us a monotonic clock on OS X. I'm not sure if this fits in toclock_gettime
, so I've added a new function for getting the absolute time and another function for converting the absolute time to nanoseconds.
I think that "I'm not sure if this fits in to clock_gettime
" is
too weak reason to introduce new methods.
Tanaka Akira
Updated by tenderlovemaking (Aaron Patterson) over 11 years ago
On Sun, Aug 11, 2013 at 09:46:41PM +0900, Tanaka Akira wrote:
2013/8/11 tenderlovemaking (Aaron Patterson) tenderlove@ruby-lang.org:
Feature #8777: Process.mach_absolute_time
https://bugs.ruby-lang.org/issues/8777This is related to #8658.
mach_absolute_time
will give us a monotonic clock on OS X. I'm not sure if this fits in toclock_gettime
, so I've added a new function for getting the absolute time and another function for converting the absolute time to nanoseconds.I think that "I'm not sure if this fits in to
clock_gettime
" is
too weak reason to introduce new methods.
Sorry, I'm asking for help. I don't know how to fit it in with
clock_gettime
. Can you help me?
mach_absolute_time
requires a conversion to obtain nanoseconds, but it
seems the other clocks do not.
--
Aaron Patterson
http://tenderlovemaking.com/
Updated by naruse (Yui NARUSE) over 11 years ago
- Status changed from Open to Closed
Oops, I didn't notice this ticket.
I committed mach_absolute_time at r42573 as a part of get_clocktime with Process::CLOCK_MONOTONIC
http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getres.html
https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/KernelProgramming/services/services.html#//apple_ref/doc/uid/TP30000905-CH219-BEHJDFCA
https://developer.apple.com/library/mac/qa/qa1398/_index.html
http://www.python.org/dev/peps/pep-0418/#monotonic-clocks
Updated by tenderlovemaking (Aaron Patterson) over 11 years ago
On Fri, Aug 16, 2013 at 02:43:33PM +0900, naruse (Yui NARUSE) wrote:
Issue #8777 has been updated by naruse (Yui NARUSE).
Status changed from Open to Closed
Oops, I didn't notice this ticket.
I committed mach_absolute_time at r42573 as a part of get_clocktime with Process::CLOCK_MONOTONIC
http://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getres.html
https://developer.apple.com/library/mac/documentation/Darwin/Conceptual/KernelProgramming/services/services.html#//apple_ref/doc/uid/TP30000905-CH219-BEHJDFCA
https://developer.apple.com/library/mac/qa/qa1398/_index.html
http://www.python.org/dev/peps/pep-0418/#monotonic-clocks
Ah great! My repo is just far behind. Thank you! <3<3
--
Aaron Patterson
http://tenderlovemaking.com/
Updated by hsbt (Hiroshi SHIBATA) almost 3 years ago
- Project changed from 14 to Ruby master