summaryrefslogtreecommitdiff
path: root/tool/lib/test/unit/testcase.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2021-09-07 09:31:44 +0900
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-09-11 08:48:03 +0900
commit93c44c4ed2f3b35db862f4238e5fb104cfb7aab9 (patch)
tree9b8b863d5c69b49bc12c4ffb2015e4ba989b8bc4 /tool/lib/test/unit/testcase.rb
parent54d2d706296c325fa67d05e73aebd01698205ab5 (diff)
Move constants under the TestCase
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4813
Diffstat (limited to 'tool/lib/test/unit/testcase.rb')
-rw-r--r--tool/lib/test/unit/testcase.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/tool/lib/test/unit/testcase.rb b/tool/lib/test/unit/testcase.rb
index 008c8805a1..d342e384af 100644
--- a/tool/lib/test/unit/testcase.rb
+++ b/tool/lib/test/unit/testcase.rb
@@ -154,6 +154,11 @@ module Test
PASSTHROUGH_EXCEPTIONS = [NoMemoryError, SignalException,
Interrupt, SystemExit] # :nodoc:
+ # kernel resolution can limit the minimum time we can measure
+ # [ruby-core:81540]
+ MIN_HZ = windows? ? 67 : 100
+ MIN_MEASURABLE = 1.0 / MIN_HZ
+
##
# Runs the tests reporting the status to +runner+