module Kubes::Util::Time
Public Instance Methods
pretty_time(total_seconds)
click to toggle source
# File lib/kubes/util/time.rb, line 4 def pretty_time(total_seconds) minutes = (total_seconds / 60) % 60 seconds = total_seconds % 60 if total_seconds < 60 "#{seconds.to_i}s" else "#{minutes.to_i}m #{seconds.to_i}s" end end