Skip to content

Commit

Permalink
Sleeping 0.0001s * 100 might == 0.01 sometimes
Browse files Browse the repository at this point in the history
  • Loading branch information
headius committed Nov 6, 2024
1 parent 2b3ace1 commit 68b1239
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/thread/wakeup_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
end_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)

actual_duration = end_time - start_time
(actual_duration > 0.01).should == true # 100 * 0.0001 => 0.01
(actual_duration >= 0.01).should == true # 100 * 0.0001 => 0.01
(actual_duration < 0.03).should == true
end
end

0 comments on commit 68b1239

Please sign in to comment.