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

Signed-off-by: Junling Zheng <[email protected]>
---
 meta/classes/buildstats.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index e7d47c74df..6f87187233 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -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")
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#139151): 
https://lists.openembedded.org/g/openembedded-core/message/139151
Mute This Topic: https://lists.openembedded.org/mt/74645340/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to