diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/declarative/globalobject.qdoc | 2 | ||||
-rw-r--r-- | doc/src/declarative/qdeclarativedebugging.qdoc | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index f4e9d0df8f..ced797b14a 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -203,7 +203,7 @@ May throw exception with code property SQLException.DATABASE_ERR, SQLException.S \section1 Logging -\c console.log() and \c console.debug() can be used to print information +\c console.log(), \c console.debug(), \c console.time(), and \c console.timeEnd() can be used to print information to the console. See \l{Debugging QML} for more information. */ diff --git a/doc/src/declarative/qdeclarativedebugging.qdoc b/doc/src/declarative/qdeclarativedebugging.qdoc index 189d4449e5..a34c2faa62 100644 --- a/doc/src/declarative/qdeclarativedebugging.qdoc +++ b/doc/src/declarative/qdeclarativedebugging.qdoc @@ -43,6 +43,20 @@ Rectangle { } \endqml +\c console.time and console.timeEnd log the time (in milliseconds) that was spent between +the calls. Both take a string argument that identifies the measurement. For example: + +\qml +function f() { + console.time("wholeFunction"); + console.time("firstPart"); + // first part + console.timeEnd("firstPart"); + // second part + console.timeEnd("wholeFunction"); +} +\endqml + \section1 Debugging Transitions When a transition doesn't look quite right, it can be helpful to view it in slow |