* process.c (rb_clock_gettime): Rename POSIX_TIME_CLOCK_REALTIME to

ISO_C_TIME_CLOCK_REALTIME.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42607 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-08-18 05:34:13 +00:00
parent 5da36600a1
commit 408b8110d5
2 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Sun Aug 18 14:30:47 2013 Tanaka Akira <akr@fsij.org>
* process.c (rb_clock_gettime): Rename POSIX_TIME_CLOCK_REALTIME to
ISO_C_TIME_CLOCK_REALTIME.
Sun Aug 18 14:22:45 2013 Tanaka Akira <akr@fsij.org>
* configure.in: Revert r42604. It causes linking librt on systems

View File

@ -6682,7 +6682,7 @@ rb_proc_times(VALUE obj)
*
* Emulations for +:CLOCK_REALTIME+:
* [:POSIX_GETTIMEOFDAY_CLOCK_REALTIME] Use gettimeofday(). The resolution is 1 micro second.
* [:POSIX_TIME_CLOCK_REALTIME] Use time(). The resolution is 1 second.
* [:ISO_C_TIME_CLOCK_REALTIME] Use time(). The resolution is 1 second.
*
* Emulations for +:CLOCK_MONOTONIC+:
* [:MACH_ABSOLUTE_TIME_CLOCK_MONOTONIC] Use mach_absolute_time(), available on Darwin.
@ -6746,8 +6746,8 @@ rb_clock_gettime(int argc, VALUE *argv)
goto success;
}
#define RUBY_POSIX_TIME_CLOCK_REALTIME ID2SYM(rb_intern("POSIX_TIME_CLOCK_REALTIME"))
if (clk_id == RUBY_POSIX_TIME_CLOCK_REALTIME) {
#define RUBY_ISO_C_TIME_CLOCK_REALTIME ID2SYM(rb_intern("ISO_C_TIME_CLOCK_REALTIME"))
if (clk_id == RUBY_ISO_C_TIME_CLOCK_REALTIME) {
time_t t;
t = time(NULL);
if (t == (time_t)-1)