module Console::Clock

def self.formatted_duration(duration)

def self.formatted_duration(duration)
	if duration < 60.0
		return "#{duration.round(2)}s"
	end
	
	duration /= 60.0
	
	if duration < 60.0
		return "#{duration.floor}m"
	end
	
	duration /= 60.0
	
	if duration < 24.0
		return "#{duration.floor}h"
	end
	
	duration /= 24.0
	
	return "#{duration.floor}d"
end

def self.now

Get the current elapsed monotonic time.
def self.now
	::Process.clock_gettime(::Process::CLOCK_MONOTONIC)
end