Add bin and edit workflow
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s

This commit is contained in:
2026-09-16 13:11:16 -06:00
parent c8ac4fcae5
commit 4cee170d66
17576 changed files with 895740 additions and 2 deletions
@@ -0,0 +1,35 @@
# frozen_string_literal: true
# Released under the MIT License.
# Copyright, 2021-2022, by Samuel Williams.
module Console
module Clock
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
# Get the current elapsed monotonic time.
def self.now
::Process.clock_gettime(::Process::CLOCK_MONOTONIC)
end
end
end