mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 05:25:34 +02:00
gettimeofday is obsolete
* test/ruby/test_process.rb gettimeofday is obsolete in SUSv4, and may not be available in the future. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d31d66314b
commit
cb2a2c2737
1 changed files with 10 additions and 2 deletions
|
@ -2046,7 +2046,11 @@ EOS
|
|||
|
||||
def test_clock_gettime_GETTIMEOFDAY_BASED_CLOCK_REALTIME
|
||||
n = :GETTIMEOFDAY_BASED_CLOCK_REALTIME
|
||||
t = Process.clock_gettime(n)
|
||||
begin
|
||||
t = Process.clock_gettime(n)
|
||||
rescue Errno::EINVAL
|
||||
return
|
||||
end
|
||||
assert_kind_of(Float, t, "Process.clock_gettime(:#{n})")
|
||||
end
|
||||
|
||||
|
@ -2124,7 +2128,11 @@ EOS
|
|||
|
||||
def test_clock_getres_GETTIMEOFDAY_BASED_CLOCK_REALTIME
|
||||
n = :GETTIMEOFDAY_BASED_CLOCK_REALTIME
|
||||
t = Process.clock_getres(n)
|
||||
begin
|
||||
t = Process.clock_getres(n)
|
||||
rescue Errno::EINVAL
|
||||
return
|
||||
end
|
||||
assert_kind_of(Float, t, "Process.clock_getres(:#{n})")
|
||||
assert_equal(1000, Process.clock_getres(n, :nanosecond))
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue