Use TimeUnit enum to specify the bucket size.
Test: all statsd unit test passed
Change-Id: I4f6b80ba2f8c984b06e46e6de6df3e546e99a968
diff --git a/cmds/statsd/src/stats_log_util.h b/cmds/statsd/src/stats_log_util.h
index 1f81860..33303dc 100644
--- a/cmds/statsd/src/stats_log_util.h
+++ b/cmds/statsd/src/stats_log_util.h
@@ -17,6 +17,7 @@
#pragma once
#include <android/util/ProtoOutputStream.h>
+#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
#include "frameworks/base/cmds/statsd/src/stats_log.pb.h"
#include "field_util.h"
@@ -36,6 +37,9 @@
void writeFieldValueTreeToStream(const FieldValueMap &fieldValueMap,
util::ProtoOutputStream* protoOutput);
+// Convert the TimeUnit enum to the bucket size in millis.
+int64_t TimeUnitToBucketSizeInMillis(TimeUnit unit);
+
} // namespace statsd
} // namespace os
} // namespace android
\ No newline at end of file