зеркало из https://github.com/github/ruby.git
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:
Родитель
4274b7975e
Коммит
42e5ff998b
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче