Class: Tepoch::Clock

Inherits:
Object
  • Object
show all
Defined in:
lib/tepoch/clock.rb

Instance Method Summary collapse

Instance Method Details

#tick(to_utc = true) ⇒ Object



4
5
6
7
8
# File 'lib/tepoch/clock.rb', line 4

def tick(to_utc = true)
  timestamp = Time.now.to_i

  print "#{timestamp} | #{Tepoch.to_time(timestamp, to_utc)} | #{Util.seconds_to_string(timestamp)} \r"
end