diff --git a/tools/get_build_time.sh b/tools/get_build_time.sh index a89c024f97ea2808a99584d113392f30d0609122..1563fefff379919425e42126a0bb80e3e91e08d3 100755 --- a/tools/get_build_time.sh +++ b/tools/get_build_time.sh @@ -15,4 +15,8 @@ # limitations under the License. CUR_ROOT=$(dirname "$0")/.. -/usr/bin/time -f '%C, %E elapsed, %U user, %S sys' "$@" >> $CUR_ROOT/build/build-time 2>&1 +start=$(date +%s.%N) +duration=$("/usr/bin/time" -f "%C, %E elapsed, %U user, %S sys" "$@" 2>&1) +end=$(date +%s.%N) + +echo ${duration}, 'start', $start, 'end', $end, 'process', $$ >> $CUR_ROOT/build/build-time