buildstats.bbclass: Do not recalculate build start time

The build start time is recorded in __timedata_build, which we should
use rather than recalculating it.

(From OE-Core rev: b723e9a4de67f33f61f2e7fe36ea451a46840b3e)

Signed-off-by: Junling Zheng <zhengjunling@huawei.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Junling Zheng 2020-06-03 15:38:28 +08:00 committed by Richard Purdie
parent 388250a48f
commit 373c2637c3

View File

@ -136,7 +136,7 @@ python run_buildstats () {
if x:
f.write(x + " ")
f.write("\n")
f.write("Build Started: %0.2f \n" % time.time())
f.write("Build Started: %0.2f \n" % d.getVar('__timedata_build', False)[0])
elif isinstance(e, bb.event.BuildCompleted):
build_time = os.path.join(bsdir, "build_stats")