diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-17 11:13:01 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-08-17 11:13:01 +0000 |
commit | ce34fce82bdb53717da13e5b03aebdb6af8aa84b (patch) | |
tree | 24ae83a4ad9f98ae5c8b33dc35a64b5d81241c9e | |
parent | 2a0482b4d46bcf5463eb7530cb5b97beacc144db (diff) | |
download | ruby-ce34fce82bdb53717da13e5b03aebdb6af8aa84b.tar.gz |
* process.c: [DOC] MACH_ABSOLUTE_TIME_CLOCK_MONOTONIC is an
available emulation for a monotonic clock on Darwin.
https://developer.apple.com/library/mac/qa/qa1398/_index.html
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | process.c | 10 |
2 files changed, 14 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Sat Aug 17 20:11:49 2013 Benoit Daloze <eregontp@gmail.com> + + * process.c: [DOC] MACH_ABSOLUTE_TIME_CLOCK_MONOTONIC is an + available emulation for a monotonic clock on Darwin. + https://developer.apple.com/library/mac/qa/qa1398/_index.html + Fri Aug 16 18:12:05 2013 Koichi Sasada <ko1@atdot.net> * test/profile_test_all.rb: fix typo. @@ -6671,14 +6671,20 @@ rb_proc_times(VALUE obj) * [CLOCK_UPTIME_PRECISE] FreeBSD 8.1 * [CLOCK_SECOND] FreeBSD 8.1 * - * Also, several symbols are accepted as +clock_id+. - * They may be used as emulation for clock_gettime(). + * Also, several other symbols are accepted as +clock_id+. + * There are emulations for clock_gettime(). + * * For example, Process::CLOCK_REALTIME is defined as * +:POSIX_GETTIMEOFDAY_CLOCK_REALTIME+ when clock_gettime() is not available. * + * Emulations for +:CLOCK_REALTIME+: * [:POSIX_GETTIMEOFDAY_CLOCK_REALTIME] Use gettimeofday(). The precision is 1 micro second. * [:POSIX_TIME_CLOCK_REALTIME] Use time(). The precision is 1 second. * + * Emulations for +:CLOCK_MONOTONIC+: + * [:MACH_ABSOLUTE_TIME_CLOCK_MONOTONIC] Use mach_absolute_time(), available on Darwin. + * The precision is CPU dependent. + * * If the given +clock_id+ is not supported, Errno::EINVAL is raised. * * +unit+ specifies a type of the return value. |