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

spec/ruby/core/process/clock_getres_spec.rb: lax the resolution limit

Android is Linux, but the clock resolution is 10 milliseconds.
I think that 1 microsecond is too strict for embedded environment.
This change laxes the limit to 10 milliseconds.
This commit is contained in:
Yusuke Endoh 2020-05-03 00:09:58 +09:00
parent fe2a832ace
commit 224f29c8e9

View file

@ -20,14 +20,14 @@ describe "Process.clock_getres" do
# These are observed
platform_is :linux, :darwin, :windows do
it "with Process::CLOCK_REALTIME reports at least 1 microsecond" do
Process.clock_getres(Process::CLOCK_REALTIME, :nanosecond).should <= 1_000
it "with Process::CLOCK_REALTIME reports at least 10 millisecond" do
Process.clock_getres(Process::CLOCK_REALTIME, :nanosecond).should <= 10_000_000
end
end
platform_is :linux, :darwin, :windows do
it "with Process::CLOCK_MONOTONIC reports at least 1 microsecond" do
Process.clock_getres(Process::CLOCK_MONOTONIC, :nanosecond).should <= 1_000
it "with Process::CLOCK_MONOTONIC reports at least 10 millisecond" do
Process.clock_getres(Process::CLOCK_MONOTONIC, :nanosecond).should <= 10_000_000
end
end
end