1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* process.c: [DOC] RDoc formatting of Process.clock_gettime

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
zzak 2013-08-12 04:48:28 +00:00
parent 8b95e93263
commit 7f0a26e271
2 changed files with 16 additions and 11 deletions

View file

@ -1,3 +1,7 @@
Mon Aug 12 13:47:54 2013 Zachary Scott <e@zzak.io>
* process.c: [DOC] RDoc formatting of Process.clock_gettime
Mon Aug 12 13:29:09 2013 Zachary Scott <e@zzak.io> Mon Aug 12 13:29:09 2013 Zachary Scott <e@zzak.io>
* lib/yaml/dbm.rb: [DOC] Document call-seq for YAML::DBM * lib/yaml/dbm.rb: [DOC] Document call-seq for YAML::DBM

View file

@ -6639,16 +6639,17 @@ rb_proc_times(VALUE obj)
/* /*
* call-seq: * call-seq:
* Process.clock_gettime(clk_id [, unit]) -> number * Process.clock_gettime(clock_id [, unit]) -> number
* *
* Returns a time returned by POSIX clock_gettime() function. * Returns a time returned by POSIX clock_gettime() function.
* *
* _clk_id_ specifies a kind of clock. * +clock_id+ specifies a kind of clock.
* It is specifed as a constant which begins with <code>Process::CLOCK_</code> * It is specifed as a constant which begins with <code>Process::CLOCK_</code>
* such like <code>Process::CLOCK_REALTIME</code> and * such as Process::CLOCK_REALTIME and Process::CLOCK_MONOTONIC.
* <code>Process::CLOCK_MONOTONIC</code>. *
* The supported constants depends on OS and version. * The supported constants depends on OS and version.
* Ruby provides following type of _clk_id_ if available. *
* Ruby provides following types of +clock_id+ if available.
* *
* [CLOCK_REALTIME] SUSv2 to 4, Linux 2.5.63, FreeBSD 3.0, NetBSD 2.0, OpenBSD 2.1 * [CLOCK_REALTIME] SUSv2 to 4, Linux 2.5.63, FreeBSD 3.0, NetBSD 2.0, OpenBSD 2.1
* [CLOCK_MONOTONIC] SUSv3 to 4, Linux 2.5.63, FreeBSD 3.0, NetBSD 2.0, OpenBSD 3.4 * [CLOCK_MONOTONIC] SUSv3 to 4, Linux 2.5.63, FreeBSD 3.0, NetBSD 2.0, OpenBSD 3.4
@ -6666,17 +6667,17 @@ rb_proc_times(VALUE obj)
* [CLOCK_UPTIME_PRECISE] FreeBSD 8.1 * [CLOCK_UPTIME_PRECISE] FreeBSD 8.1
* [CLOCK_SECOND] FreeBSD 8.1 * [CLOCK_SECOND] FreeBSD 8.1
* *
* Also, several symbols are accepted as _clk_id_. * Also, several symbols are accepted as +clock_id+.
* They may be used as emulation for clock_gettime(). * They may be used as emulation for clock_gettime().
* For example, <code>Process::CLOCK_REALTIME</code> is defined as * For example, Process::CLOCK_REALTIME is defined as
* <code>:POSIX_GETTIMEOFDAY_CLOCK_REALTIME</code> when clock_gettime() is not available. * +:POSIX_GETTIMEOFDAY_CLOCK_REALTIME+ when clock_gettime() is not available.
* *
* [:POSIX_GETTIMEOFDAY_CLOCK_REALTIME] Use gettimeofday(). The precision is 1 micro second. * [:POSIX_GETTIMEOFDAY_CLOCK_REALTIME] Use gettimeofday(). The precision is 1 micro second.
* [:POSIX_TIME_CLOCK_REALTIME] Use time(). The precision is 1 second. * [:POSIX_TIME_CLOCK_REALTIME] Use time(). The precision is 1 second.
* *
* If the given _clk_id_ is not supported, Errno::EINVAL is raised. * If the given +clock_id+ is not supported, Errno::EINVAL is raised.
* *
* _unit_ specifies a type of the return value. * +unit+ specifies a type of the return value.
* *
* [:float_seconds] number of seconds as a float (default) * [:float_seconds] number of seconds as a float (default)
* [:float_milliseconds] number of milliseconds as a float * [:float_milliseconds] number of milliseconds as a float
@ -6688,7 +6689,7 @@ rb_proc_times(VALUE obj)
* The underlying function, clock_gettime(), returns a number of nanoseconds. * The underlying function, clock_gettime(), returns a number of nanoseconds.
* Float object (IEEE 754 double) is not enough to represent * Float object (IEEE 754 double) is not enough to represent
* the return value for CLOCK_REALTIME. * the return value for CLOCK_REALTIME.
* If the exact nanoseconds value is required, use :nanoseconds as _unit_. * If the exact nanoseconds value is required, use +:nanoseconds+ as the +unit+.
* *
* The origin (zero) of the returned value varies. * The origin (zero) of the returned value varies.
* For example, system start up time, process start up time, the Epoch, etc. * For example, system start up time, process start up time, the Epoch, etc.