The purpose of this program is to animate printing text in a terminal window while in a tight loop
require 'smooth_terminal_print'
smooth_terminal_print = SmoothTerminalPrint.new
loop do
smooth_terminal_print.print_smoothly do
puts Time.now.to_f * rand(10000)
puts Time.now.to_f * rand(10000)
puts Time.now.to_f * rand(10000)
puts Time.now.to_f * rand(10000)
end
end
require 'smooth_terminal_print'
smooth_terminal_print = SmoothTerminalPrint.new
loop do
io = StringIO.new
20.times do
s = ''
rand(100).times { s << '*' }
io.puts s
end
smooth_terminal_print.print_smoothly(io)
end