Skip to content

Instantly share code, notes, and snippets.

@guillermo
Forked from diegoeche/gist:2594685
Created May 4, 2012 13:50
Show Gist options
  • Save guillermo/2594909 to your computer and use it in GitHub Desktop.
Save guillermo/2594909 to your computer and use it in GitHub Desktop.
require "time"
party_time = Time.parse("5/04/2012 6:00:00 P.M.")
trap(:INT){puts ""}
loop do
seconds_left = party_time.to_i - Time.now.to_i
print "\rSeconds left to party: #{seconds_left}"
sleep(1)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment