summaryrefslogtreecommitdiffstats
path: root/WebKit/android/TimeCounter.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/android/TimeCounter.h')
-rw-r--r--WebKit/android/TimeCounter.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/WebKit/android/TimeCounter.h b/WebKit/android/TimeCounter.h
index 702aebf..64908d1 100644
--- a/WebKit/android/TimeCounter.h
+++ b/WebKit/android/TimeCounter.h
@@ -26,10 +26,7 @@
#ifndef TIME_COUNTER_H
#define TIME_COUNTER_H
-#ifdef ANDROID_INSTRUMENT
-
#include "hardware_legacy/qemu_tracing.h"
-#include <wtf/CurrentTime.h>
namespace WebCore {
@@ -39,6 +36,10 @@ class KURL;
namespace android {
+uint32_t getThreadMsec();
+
+#ifdef ANDROID_INSTRUMENT
+
class TimeCounter {
public:
enum Type {
@@ -84,9 +85,9 @@ private:
class TimeCounterAuto {
public:
TimeCounterAuto(TimeCounter::Type type) :
- m_type(type), m_startTime(WTF::get_thread_msec()) {}
+ m_type(type), m_startTime(getThreadMsec()) {}
~TimeCounterAuto() {
- uint32_t time = WTF::get_thread_msec();
+ uint32_t time = getThreadMsec();
TimeCounter::sEndWebCoreThreadTime = time;
TimeCounter::sTotalTimeUsed[m_type] += time - m_startTime;
TimeCounter::sCounter[m_type]++;
@@ -112,8 +113,8 @@ public:
private:
static int reentry_count;
};
+#endif // ANDROID_INSTRUMENT
}
-#endif
#endif