bootstat: Refactor init/utils/boot_clock into base/chrono_utils.

Use this for bootstat and init. This replaces the custom uptime parser in
bootstat.

This is a reland of aosp/332854 with a fix for Darwin.

Bug: 34352037
Test: chrono_utils_test
Change-Id: Ib2567d8df0e460ab59753ac1c053dd7f9f1008a7
diff --git a/init/service.h b/init/service.h
index 013e65f..3dc0e53 100644
--- a/init/service.h
+++ b/init/service.h
@@ -25,6 +25,8 @@
 #include <string>
 #include <vector>
 
+#include <android-base/chrono_utils.h>
+
 #include "action.h"
 #include "capabilities.h"
 #include "descriptors.h"
@@ -135,8 +137,8 @@
 
     unsigned flags_;
     pid_t pid_;
-    boot_clock::time_point time_started_; // time of last start
-    boot_clock::time_point time_crashed_; // first crash within inspection window
+    android::base::boot_clock::time_point time_started_; // time of last start
+    android::base::boot_clock::time_point time_crashed_; // first crash within inspection window
     int crash_count_;                     // number of times crashed within window
 
     uid_t uid_;