Fix display_time
This commit is contained in:
parent
4b5c09f63b
commit
2969a24cb0
@ -8,15 +8,16 @@ module CompletionsConcern
|
||||
"0" + n.to_s
|
||||
end
|
||||
|
||||
def display_time(seconds)
|
||||
if seconds > 3600
|
||||
hours = seconds / 3600
|
||||
return hours.to_s + ":" + display_time(seconds % 3600)
|
||||
elsif seconds > 60
|
||||
minutes = seconds / 60
|
||||
return pad(minutes) + ":" + display_time(seconds % 60)
|
||||
def display_time(time)
|
||||
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
|
||||
pad(seconds)
|
||||
s.to_s
|
||||
end
|
||||
|
||||
def extend_completions!(contestant)
|
||||
|
@ -28,7 +28,7 @@ javascript:
|
||||
</svg>
|
||||
=< t("contests.show.copy_extension_url")
|
||||
|
||||
.row.mb-4 style="height: calc(100vh - 320px)"
|
||||
.row.mb-4 style="height: calc(100vh - 280px)"
|
||||
.col-7.d-flex.flex-column style="height: 100%"
|
||||
.row
|
||||
.col
|
||||
|
Loading…
x
Reference in New Issue
Block a user