⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby 1.8
All Projects
Ruby
»
Ruby 1.8
Overview
Activity
Roadmap
Issues
Wiki
Like
Download (270 Bytes)
Bug #2264
» test_sleep.rb
romuloceccon (Rômulo Ceccon)
, 10/25/2009 01:23 AM
require
'benchmark'
def
check
(
1
..
3
).
each
{
puts
Benchmark
.
measure
{
i
=
0
(
1
..
100000
).
each
{
i
+=
1
}
}
}
end
puts
'before:'
check
th
=
Thread
.
new
do
loop
do
sleep
(
1
)
end
end
puts
'after:'
check
(1-1/1)
Loading...