mirror of https://gitlab.freedesktop.org/mesa/mesa
ci: convert the job start date into a timestamp only once
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28344>
This commit is contained in:
parent
775eca9449
commit
ed45e373bf
|
@ -14,9 +14,10 @@ function x_off {
|
|||
|
||||
# TODO: implement x_on !
|
||||
|
||||
export JOB_START_S=$(date -u +"%s" -d "${CI_JOB_STARTED_AT:?}")
|
||||
|
||||
function get_current_minsec {
|
||||
DATE_S=$(date -u +"%s")
|
||||
JOB_START_S=$(date -u +"%s" -d "${CI_JOB_STARTED_AT:?}")
|
||||
CURR_TIME=$((DATE_S-JOB_START_S))
|
||||
echo "$(printf "%02d" $((CURR_TIME/60))):$(printf "%02d" $((CURR_TIME%60)))"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue