diff options
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 27a24f0764..edd44ca0ae 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -591,7 +591,8 @@ class TestRubyOptions < Test::Unit::TestCase pid = spawn(EnvUtil.rubybin, "test-script") ps = nil - stop = Process.clock_gettime(Process::CLOCK_MONOTONIC) + 30 + now = Process.clock_gettime(Process::CLOCK_MONOTONIC) + stop = now + 30 begin sleep 0.1 ps = `#{PSCMD.join(' ')} #{pid}` @@ -620,7 +621,8 @@ class TestRubyOptions < Test::Unit::TestCase pid = spawn(EnvUtil.rubybin, "test-script") ps = nil - stop = Process.clock_gettime(Process::CLOCK_MONOTONIC) + 30 + now = Process.clock_gettime(Process::CLOCK_MONOTONIC) + stop = now + 30 begin sleep 0.1 ps = `#{PSCMD.join(' ')} #{pid}` |