diff options
author | Steve Block <steveblock@google.com> | 2009-11-20 13:26:23 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2009-11-20 15:34:54 +0000 |
commit | 716ed672a4274d2a4e960593e02a2cc59a96a82f (patch) | |
tree | ea10c97ec5dcf3e9b083b1f1ebf43e1b2ca53e3d /WebKit/android/TimeCounter.h | |
parent | 6f781ac6264a1eb957adc5a410ae350ddeb2a6a2 (diff) | |
download | external_webkit-716ed672a4274d2a4e960593e02a2cc59a96a82f.zip external_webkit-716ed672a4274d2a4e960593e02a2cc59a96a82f.tar.gz external_webkit-716ed672a4274d2a4e960593e02a2cc59a96a82f.tar.bz2 |
Moves get_thread_msec from JavaScriptCore/wtf/CurrentTime to WebKit/android/Timecounter.
This function is an Android addition to JavaScriptCore::WTF, but is not used anywhere in WebCore or JavaScriptCore.
Futhermore, JavaScriptCore/wtf/CurrentTime does not contain any other platform additions.
It's used primarily in WebKit/android/TimeCounter, so I've moved it there.
I've also updated the name to getThreadMsec to match WebKit style.
Change-Id: Ia4f91efd3caaafd1fb079afe6c493aefea402582
Diffstat (limited to 'WebKit/android/TimeCounter.h')
-rw-r--r-- | WebKit/android/TimeCounter.h | 13 |
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 |