JavaScriptCore/ChangeLog

 12010-01-22 Kwang Yul Seo <skyul@company100.net>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 [BREWMP] Port getCPUTime
 6 https://bugs.webkit.org/show_bug.cgi?id=33572
 7
 8 Use GETUPTIMEMS which returns a continuously and
 9 linearly increasing millisecond timer from the time the device
 10 was powered on. This function is enough to implement getCPUTime.
 11
 12 * runtime/TimeoutChecker.cpp:
 13 (JSC::getCPUTime):
 14
1152010-01-22 Steve Falkenburg <sfalken@apple.com>
216
317 Reviewed by Darin Adler.
53749

JavaScriptCore/runtime/TimeoutChecker.cpp

4141#include "CurrentTime.h"
4242#endif
4343
 44#if PLATFORM(BREWMP)
 45#undef COMPILE_ASSERT
 46#include <AEEStdLib.h>
 47#endif
 48
4449using namespace std;
4550
4651namespace JSC {

@@static inline unsigned getCPUTime()
8085 GetThreadTimes(GetCurrentThread(), &creationTime, &exitTime, &kernelTime.fileTime, &userTime.fileTime);
8186
8287 return userTime.fileTimeAsLong / 10000 + kernelTime.fileTimeAsLong / 10000;
 88#elif PLATFORM(BREWMP)
 89 // This function returns a continuously and linearly increasing millisecond
 90 // timer from the time the device was powered on.
 91 // There is only one thread in BREW, so this is enough.
 92 return GETUPTIMEMS();
8393#else
8494 // FIXME: We should return the time the current thread has spent executing.
8595 return currentTime() * 1000;
53742