ruby-changes:22848
From: naruse <ko1@a...>
Date: Mon, 5 Mar 2012 10:16:31 +0900 (JST)
Subject: [ruby-changes:22848] naruse:r34897 (trunk): Old linux (at least CentOS 5.6, kernel 2.6.18) wakes up 4.99 sec.
naruse 2012-03-05 10:16:19 +0900 (Mon, 05 Mar 2012) New Revision: 34897 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=34897 Log: Old linux (at least CentOS 5.6, kernel 2.6.18) wakes up 4.99 sec. Modified files: trunk/test/ruby/test_sleep.rb Index: test/ruby/test_sleep.rb =================================================================== --- test/ruby/test_sleep.rb (revision 34896) +++ test/ruby/test_sleep.rb (revision 34897) @@ -6,7 +6,8 @@ start = Time.now sleep 5 slept = Time.now-start - assert_operator(5.0, :<=, slept) + bottom = /Linux ([\d.]+)/ =~ `uname -sr` && $1.split('.')>%w/2 6.18/ ? 4.99 : 5.0 + assert_operator(bottom, :<=, slept) assert_operator(slept, :<=, 6.0, "[ruby-core:18015]: longer than expected") ensure GC.enable -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/