File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed
Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -51,18 +51,15 @@ def o.divmod(*); [0, 0.001]; end
5151 t . value . should == 5
5252 end
5353
54- platform_is_not :darwin do
55- it "sleeps with nanosecond precision" do
56- start_time = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
57- 100 . times do
58- sleep ( 0.0001 )
59- end
60- end_time = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
61-
62- actual_duration = end_time - start_time
63- ( actual_duration > 0.01 ) . should == true # 100 * 0.0001 => 0.01
64- ( actual_duration < 0.03 ) . should == true
54+ it "sleeps with nanosecond precision" do
55+ start_time = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
56+ 100 . times do
57+ sleep ( 0.0001 )
6558 end
59+ end_time = Process . clock_gettime ( Process ::CLOCK_MONOTONIC )
60+
61+ actual_duration = end_time - start_time
62+ actual_duration . should > 0.01 # 100 * 0.0001 => 0.01
6663 end
6764
6865 ruby_version_is "" ..."3.3" do
You can’t perform that action at this time.
0 commit comments