* 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:
parent
5da36600a1
commit
408b8110d5
@ -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>
|
Sun Aug 18 14:22:45 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* configure.in: Revert r42604. It causes linking librt on systems
|
* configure.in: Revert r42604. It causes linking librt on systems
|
||||||
|
@ -6682,7 +6682,7 @@ rb_proc_times(VALUE obj)
|
|||||||
*
|
*
|
||||||
* Emulations for +:CLOCK_REALTIME+:
|
* Emulations for +:CLOCK_REALTIME+:
|
||||||
* [:POSIX_GETTIMEOFDAY_CLOCK_REALTIME] Use gettimeofday(). The resolution is 1 micro second.
|
* [: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+:
|
* Emulations for +:CLOCK_MONOTONIC+:
|
||||||
* [:MACH_ABSOLUTE_TIME_CLOCK_MONOTONIC] Use mach_absolute_time(), available on Darwin.
|
* [: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;
|
goto success;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define RUBY_POSIX_TIME_CLOCK_REALTIME ID2SYM(rb_intern("POSIX_TIME_CLOCK_REALTIME"))
|
#define RUBY_ISO_C_TIME_CLOCK_REALTIME ID2SYM(rb_intern("ISO_C_TIME_CLOCK_REALTIME"))
|
||||||
if (clk_id == RUBY_POSIX_TIME_CLOCK_REALTIME) {
|
if (clk_id == RUBY_ISO_C_TIME_CLOCK_REALTIME) {
|
||||||
time_t t;
|
time_t t;
|
||||||
t = time(NULL);
|
t = time(NULL);
|
||||||
if (t == (time_t)-1)
|
if (t == (time_t)-1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user