mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-11 11:20:41 +01:00
ci: split get_job_seconds() computation out of get_current_minsec() formatting
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39395>
This commit is contained in:
parent
6b0e29bc77
commit
2d1d94d3c2
1 changed files with 6 additions and 2 deletions
|
|
@ -41,9 +41,13 @@ export JOB_START_S=$(
|
|||
{ date -u +"%s" -D "%Y-%m-%dT%H:%M:%SZ" "$CI_JOB_STARTED_AT" 2>/dev/null || true; }
|
||||
)
|
||||
|
||||
function get_current_minsec {
|
||||
function get_job_seconds {
|
||||
DATE_S=$(date -u +"%s")
|
||||
CURR_TIME=$((DATE_S-JOB_START_S))
|
||||
echo $((DATE_S-JOB_START_S))
|
||||
}
|
||||
|
||||
function get_current_minsec {
|
||||
CURR_TIME=$(get_job_seconds)
|
||||
printf "%02d:%02d" $((CURR_TIME/60)) $((CURR_TIME%60))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue