diff --git a/index.bs b/index.bs index b6d3d08..e389fa9 100644 --- a/index.bs +++ b/index.bs @@ -66,8 +66,8 @@ namespace console { // but see namespace object requirements below // Timing void time(optional DOMString label = "default"); - void timeEnd(optional DOMString label = "default"); void timeLog(optional DOMString label = "default", any... data); + void timeEnd(optional DOMString label = "default"); }; @@ -229,18 +229,6 @@ Each {{console}} namespace object has an associated timer table, whic 1. Otherwise, [=map/set=] the value of the entry with key |label| in the associated timer table to the current time. -

timeEnd(|label|)

- -1. Let |timerTable| be the associated timer table. -1. Let |startTime| be |timerTable|[|label|]. -1. [=map/set|Remove=] |timerTable|[|label|]. -1. Let |duration| be a string representing the difference between the current time and - |startTime|, in an implementation-defined format. -

"4650", "4650.69 ms", "5 seconds", and "00:05" - are all reasonable ways of displaying a 4650.69 ms duration.

-1. Let |concat| be the concatenation of |label|, U+003A (:), U+0020 SPACE, and |duration|. -1. Perform Printer("timeEnd", « |concat| »). -

timeLog(|label|, ...|data|)

1. Let |timerTable| be the associated timer table. @@ -269,6 +257,18 @@ Each {{console}} namespace object has an associated timer table, whic +

timeEnd(|label|)

+ +1. Let |timerTable| be the associated timer table. +1. Let |startTime| be |timerTable|[|label|]. +1. [=map/Remove=] |timerTable|[|label|]. +1. Let |duration| be a string representing the difference between the current time and + |startTime|, in an implementation-defined format. +

"4650", "4650.69 ms", "5 seconds", and "00:05" + are all reasonable ways of displaying a 4650.69 ms duration.

+1. Let |concat| be the concatenation of |label|, U+003A (:), U+0020 SPACE, and |duration|. +1. Perform Printer("timeEnd", « |concat| »). +

See whatwg/console#134 for plans to make {{console/timeEnd()}} and {{console/timeLog()}} formally report warnings to the console when a given |label| does not exist in the associated timer table. @@ -423,7 +423,7 @@ their output similarly, in four broad categories. This table summarizes these co log {{console/log()}}, {{console/trace()}}, {{console/dir()}}, {{console/dirxml()}}, - {{console/group()}}, {{console/groupCollapsed()}}, {{console/debug()}} {{console/timeLog()}} + {{console/group()}}, {{console/groupCollapsed()}}, {{console/debug()}}, {{console/timeLog()}} A generic log