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:
parent
4274b7975e
commit
42e5ff998b
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue