Revert^4 "[metrics] Add background reporting thread"
This adds a background thread that reports metrics every N seconds,
where N is specified by the -Xmetrics-reporting-period command line
option. Periodic reporting is disabled by default.
This reverts commit 1060838894e34785139b5e3583fbc9edad7fa7f9.
Reason for revert: Remove problematic test
Test: test/run-test --host 2233-metrics-background-thread
Test: adb shell stop && \
adb shell setprop dalvik.vm.extra-opts \
-Xmetrics-reporting-period=30\\\ -Xwrite-metrics-to-log && \
adb shell start && \
adb logcat # observe metrics in log
Bug: 170149255
Change-Id: I3d72043bbb1e652728253585aae5486598658d2b
diff --git a/libartbase/base/time_utils.h b/libartbase/base/time_utils.h
index cb0ab13..e1273a3 100644
--- a/libartbase/base/time_utils.h
+++ b/libartbase/base/time_utils.h
@@ -87,6 +87,10 @@
return us * 1000;
}
+static constexpr uint64_t SecondsToMs(uint64_t seconds) {
+ return seconds * 1000;
+}
+
static constexpr time_t SaturatedTimeT(int64_t secs) {
if (sizeof(time_t) < sizeof(int64_t)) {
return static_cast<time_t>(std::min(secs,