Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@eggplants
Created June 23, 2019 22:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eggplants/77904c227a531ecb322e1e7fe7b43983 to your computer and use it in GitHub Desktop.
Save eggplants/77904c227a531ecb322e1e7fe7b43983 to your computer and use it in GitHub Desktop.
require 'time'
o = Time.now
begin
loop do
dt = Time.at((n=Time.now)-o.to_i)
print (n-o).to_i%1800==0? 7.chr
: Time.at(Time.at(61200)-dt).strftime("LEFT TIME::{%Hh:%Mm:%Ss}")
print "\r"
sleep(1)
end
rescue Interrupt
puts 7.chr
puts "!!!stop!!!"
3.times{print(".");sleep(1)}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment