five_sec_clock = Thread.new { attr_accessor :tick a = 0 for a < 11 @tick = Time.now sleep 5 a += 1 end } i = 0 for i <= 50 puts five_sec_clock.foo i += 1 sleep 1 end