Remove unused systemTime() and include utils/Timers.h.
Remove a systemTime() function from power/power.c that
doesn't appear to be called anywhere, and make several
audio/ files explicitly include utils/Timers.h for the
libutils version of systemTime(). (They appear to have been
transitively getting it via utils/threads.h's include of
utils/Condition.h.)
Change-Id: I432bb1cf1100f5829df307a146076acf035a0bdc
diff --git a/audio/A2dpAudioInterface.cpp b/audio/A2dpAudioInterface.cpp
index 4ab52ba..50708ba 100644
--- a/audio/A2dpAudioInterface.cpp
+++ b/audio/A2dpAudioInterface.cpp
@@ -20,6 +20,7 @@
#define LOG_TAG "A2dpAudioInterface"
#include <utils/Log.h>
#include <utils/String8.h>
+#include <utils/Timers.h>
#include "A2dpAudioInterface.h"
#include "audio/liba2dp.h"
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp
index 85b0084..5774db2 100644
--- a/audio/AudioPolicyManagerBase.cpp
+++ b/audio/AudioPolicyManagerBase.cpp
@@ -36,6 +36,7 @@
#include <cutils/properties.h>
#include <utils/Log.h>
+#include <utils/Timers.h>
#include <hardware/audio.h>
#include <hardware/audio_effect.h>
diff --git a/power/power.c b/power/power.c
index e0eda2d..77e2463 100644
--- a/power/power.c
+++ b/power/power.c
@@ -19,8 +19,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
-#include <sys/time.h>
-#include <time.h>
#include <errno.h>
#include <string.h>
#include <sys/stat.h>
@@ -51,14 +49,6 @@
static int g_fds[OUR_FD_COUNT];
static int g_error = 1;
-static int64_t systemTime()
-{
- struct timespec t;
- t.tv_sec = t.tv_nsec = 0;
- clock_gettime(CLOCK_MONOTONIC, &t);
- return t.tv_sec*1000000000LL + t.tv_nsec;
-}
-
static int
open_file_descriptors(const char * const paths[])
{