Project

General

Profile

Bug #12808

Ruby builds do not produce Process::UPTIME constant on macOS Sierra

Added by iamasmith (Andrew Smith) about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.1.9p490 (2016-03-30 revision 54437) [x86_64-darwin16]
[ruby-core:77482]

Description

Due to the fact that macOS Sierra does not define CLOCK_UPTIME in /usr/include/time.h the UPTIME constant is never generated during the Ruby build.

macOS defines CLOCK_UPTIME_RAW instead as..

clock that increments monotonically, in the same manner as CLOCK_MONOTONIC_RAW, but that does not increment while the system is asleep. The returned value
is identical to the result of mach_absolute_time() after the appropriate mach_timebase conversion is applied.

It appears this is done to provide a selection for uptime value based on sleeping or non sleeping return value.

History

Updated by naruse (Yui NARUSE) about 3 years ago

  • Status changed from Open to Closed

It will be a Ruby 2.4 feature by r56200.

Also available in: Atom PDF