Generate build timing metrics to proto format file

Test: Dumped the text formated based metrics file to out dir,
and checked the file.
Bug: b/63815990

Change-Id: Iff476f72a0be74eb53b6b26ef468d11c0f24a404
diff --git a/ui/build/config.go b/ui/build/config.go
index 5a6d5db..97b009a 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -217,6 +217,9 @@
 	} else {
 		content = strconv.FormatInt(time.Now().Unix(), 10)
 	}
+	if ctx.Metrics != nil {
+		ctx.Metrics.SetBuildDateTime(content)
+	}
 	err := ioutil.WriteFile(buildDateTimeFile, []byte(content), 0777)
 	if err != nil {
 		ctx.Fatalln("Failed to write BUILD_DATETIME to file:", err)