Changeset 34048 in webkit for trunk/JavaScriptCore/profiler/ProfileNode.cpp
- Timestamp:
- May 22, 2008, 9:32:47 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/profiler/ProfileNode.cpp
r34043 r34048 35 35 #include <stdio.h> 36 36 37 #if PLATFORM(WIN_OS) 38 #include <windows.h> 39 #endif 40 37 41 namespace KJS { 38 42 39 43 static const char* NonJSExecution = "(idle)"; 44 45 static double getCount() 46 { 47 #if PLATFORM(WIN_OS) 48 static LARGE_INTEGER frequency = {0}; 49 if (!frequency.QuadPart) 50 QueryPerformanceFrequency(&frequency); 51 LARGE_INTEGER counter; 52 QueryPerformanceCounter(&counter); 53 return static_cast<double>(counter.QuadPart) / frequency.QuadPart; 54 #else 55 return getCurrentUTCTimeWithMicroseconds(); 56 #endif 57 } 40 58 41 59 ProfileNode::ProfileNode(const CallIdentifier& callIdentifier, ProfileNode* headNode, ProfileNode* parentNode) … … 298 316 void ProfileNode::endAndRecordCall() 299 317 { 300 m_actualTotalTime += getC urrentUTCTimeWithMicroseconds() - m_startTime;318 m_actualTotalTime += getCount() - m_startTime; 301 319 m_startTime = 0.0; 302 320 … … 307 325 { 308 326 if (!m_startTime) 309 m_startTime = getC urrentUTCTimeWithMicroseconds();327 m_startTime = getCount(); 310 328 } 311 329
Note:
See TracChangeset
for help on using the changeset viewer.