I have coded something in ruby. Now, I want to make it so that every 3 seconds that code runs again. I have looked at threading. I built a thread and I put a
while true do end
loop inside it. Also I make it sleep for 3 seconds. Take a look
Thread.new do
while true do
#code
end
sleep 3
end
My problem is that when I run my code it doesn't run it at all and it doesn't repeat. Thank you