Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- begin
- time_start=Time.now.to_i
- puts "hello1"
- sleep 10
- raise "Timeout" if (Time.now.to_i-time_start) > 20
- puts "hello2"
- sleep 20
- raise "Timeout" if (Time.now.to_i-time_start) > 20
- rescue
- puts "timeout"
- end
Add Comment
Please, Sign In to add comment