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:

committed by
Marge Bot

parent
775eca9449
commit
ed45e373bf
@@ -14,9 +14,10 @@ function x_off {
|
|||||||
|
|
||||||
# TODO: implement x_on !
|
# TODO: implement x_on !
|
||||||
|
|
||||||
|
export JOB_START_S=$(date -u +"%s" -d "${CI_JOB_STARTED_AT:?}")
|
||||||
|
|
||||||
function get_current_minsec {
|
function get_current_minsec {
|
||||||
DATE_S=$(date -u +"%s")
|
DATE_S=$(date -u +"%s")
|
||||||
JOB_START_S=$(date -u +"%s" -d "${CI_JOB_STARTED_AT:?}")
|
|
||||||
CURR_TIME=$((DATE_S-JOB_START_S))
|
CURR_TIME=$((DATE_S-JOB_START_S))
|
||||||
echo "$(printf "%02d" $((CURR_TIME/60))):$(printf "%02d" $((CURR_TIME%60)))"
|
echo "$(printf "%02d" $((CURR_TIME/60))):$(printf "%02d" $((CURR_TIME%60)))"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user