Changeset 126276 in webkit
- Timestamp:
- Aug 22, 2012 1:42:57 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r126275 r126276 1 2012-08-21 Andrey Kosyakov <caseq@chromium.org> 2 3 Web Inspector: console.time() should use performance.now() 4 https://bugs.webkit.org/show_bug.cgi?id=94263 5 6 Reviewed by Pavel Feldman. 7 8 - use monotonicallyIncreasingTime() instead of currentTime() for measuring time intervals 9 with console.time()/console.timeEnd() 10 - adjust precision to 3 digits after decimal point (i.e. microseconds) when formatting intervals; 11 12 * inspector/InspectorConsoleAgent.cpp: 13 (WebCore::InspectorConsoleAgent::stopTiming): 14 1 15 2012-08-22 Takashi Sakamoto <tasak@google.com> 2 16 -
trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp
r125174 r126276 164 164 return; 165 165 166 m_times.add(title, currentTime() * 1000);166 m_times.add(title, monotonicallyIncreasingTime()); 167 167 } 168 168 … … 181 181 m_times.remove(it); 182 182 183 double elapsed = currentTime() * 1000- startTime;184 String message = title + String::format(": %. 0fms", elapsed);183 double elapsed = monotonicallyIncreasingTime() - startTime; 184 String message = title + String::format(": %.3fms", elapsed * 1000); 185 185 const ScriptCallFrame& lastCaller = callStack->at(0); 186 186 addMessageToConsole(JSMessageSource, LogMessageType, LogMessageLevel, message, lastCaller.sourceURL(), lastCaller.lineNumber());
Note: See TracChangeset
for help on using the changeset viewer.