summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2025-10-17 12:01:43 +0900
committerNobuyoshi Nakada <nobu.nakada@gmail.com>2025-10-17 14:52:19 +0900
commit5a23716c4f10700e9378f66702cd6797475ec30e (patch)
treea273d993f8663a1523450bd7f423eca2ed02e793
parentb2d4dc9c46719b1a67bd24a4b4cf444c90621a78 (diff)
Skip low precision clocks to measure performances
-rw-r--r--tool/lib/core_assertions.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/tool/lib/core_assertions.rb b/tool/lib/core_assertions.rb
index 7e6dc8e653..1288b8c9aa 100644
--- a/tool/lib/core_assertions.rb
+++ b/tool/lib/core_assertions.rb
@@ -838,6 +838,9 @@ eom
rescue
# Constants may be defined but not implemented, e.g., mingw.
else
+ unless Process.clock_getres(clk) < 1.0e-03
+ next # needs msec precision
+ end
PERFORMANCE_CLOCK = clk
end
end