summaryrefslogtreecommitdiff
path: root/tools/stats_log_api_gen/native_writer.cpp
diff options
context:
space:
mode:
authorMuhammad Qureshi <muhammadq@google.com>2019-12-30 12:47:26 -0800
committerMuhammad Qureshi <muhammadq@google.com>2020-01-02 14:54:39 -0800
commit2ee00fb249f1038ee0306a0ec6e6b1264b9f119f (patch)
treed5b4803cbab70a58ec20e7e83edf1b23ea1bdfe0 /tools/stats_log_api_gen/native_writer.cpp
parent4fdc7fd375f69a3219d8680ef4da90fe8cf80020 (diff)
Remove dependency on libutils in native autogen
Right now, Q schema generated code has a dependency on libutils. Turning on R schema for clients will remove libutils as a required dependency. Once libutils is removed from clients, turning the flag off again will be complicated as all clients will need to re-include libutils. To fix this problem, remove dependency on libutils in Q schema. Right now, we only use SystemClock.h from libutils in Q schema autogen. Use timespec from C standard library instead. Bug: 146808265 Test: m Test: flashes successfully Test: adb logcat "*:S statsd:*" Test: bit statsd_test:* Change-Id: I00efeab1be351a95083f3b6e2dbc9067849bee20
Diffstat (limited to 'tools/stats_log_api_gen/native_writer.cpp')
-rw-r--r--tools/stats_log_api_gen/native_writer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/stats_log_api_gen/native_writer.cpp b/tools/stats_log_api_gen/native_writer.cpp
index 8428fcb25505..c7a34feff94b 100644
--- a/tools/stats_log_api_gen/native_writer.cpp
+++ b/tools/stats_log_api_gen/native_writer.cpp
@@ -240,6 +240,7 @@ int write_stats_log_cpp(FILE *out, const Atoms &atoms, const AtomDecl &attributi
#if defined(STATS_SCHEMA_LEGACY)
write_native_stats_log_cpp_globals_q(out);
+ write_native_get_timestamp_ns_q(out);
write_native_try_stats_write_methods_q(out, atoms, attributionDecl, moduleName);
write_native_stats_write_methods_q(out, "int stats_write", atoms, attributionDecl, moduleName,
"try_stats_write");