Skip to content

Instantly share code, notes, and snippets.

@WhereIsX
Last active May 14, 2020 23:04
Show Gist options
  • Save WhereIsX/1563257e76381e133aa8ce3a8de579fa to your computer and use it in GitHub Desktop.
Save WhereIsX/1563257e76381e133aa8ce3a8de579fa to your computer and use it in GitHub Desktop.
MIN = 60
def brb
puts 'time?'
time = gets.to_i
(0..time*MIN).reverse_each do |t|
system("clear")
minutes = t / MIN
seconds = t % MIN
puts "#{minutes} : #{seconds.to_s.rjust(2, '0')}"
sleep 1
end
end
brb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment