Skip to content

Instantly share code, notes, and snippets.

@mando
Last active December 30, 2015 08:49
Show Gist options
  • Save mando/7805553 to your computer and use it in GitHub Desktop.
Save mando/7805553 to your computer and use it in GitHub Desktop.
require 'timeout'
begin
timeout(1) do
sleep(5)
end
rescue Timeout::Error => e
puts e.inspect
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment