Implement projected time
Some checks failed
CI / scan_ruby (push) Successful in 16s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 13s
CI / test (push) Failing after 35s

This commit is contained in:
sto
2025-11-14 12:13:09 +01:00
parent f91145637f
commit b88460ae71
16 changed files with 114 additions and 48 deletions

View File

@@ -7,14 +7,15 @@ module ContestsHelper
end
def display_time(time)
if time == nil
return ""
end
h = time / 3600
m = (time % 3600) / 60
s = (time % 3600) % 60
if h > 0
return h.to_s + ":" + pad(m) + ":" + pad(s)
elsif m > 0
return m.to_s + ":" + pad(s)
end
"0:" + pad(s)
m.to_s + ":" + pad(s)
end
end