I would like to know how I would be able to run .gets but continue to run the program after a certain delay.
For example:
variable=gets.chomp
#somehow continue running program to do for example:
#after a delay (sleep 10)
puts "Hello? Are you still here? The program will timeout in 10 seconds."
#asks for input again
puts "Please enter ..."
variable=gets.chomp
Thank you for your time.