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

test_benchmark.rb: extend sleep time

* test/benchmark/test_benchmark.rb: extend sleep time, as 1ms is
  too short on some environments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-08-30 06:18:57 +00:00
parent 4274b7975e
commit 42e5ff998b

View file

@ -154,7 +154,8 @@ BENCH
end
def test_realtime_output
realtime = Benchmark.realtime { sleep 0.001 }
assert_in_delta 0.001, realtime
sleeptime = 1.0
realtime = Benchmark.realtime { sleep sleeptime }
assert_in_delta sleeptime, realtime
end
end