From c7745cea58370452e6f4dd3c482af0b6b6ceb9d8 Mon Sep 17 00:00:00 2001 From: Dominic Farolino Date: Wed, 6 Jun 2018 21:38:21 -0700 Subject: [PATCH] Address latest review --- index.bs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/index.bs b/index.bs index 2c38bb8..a598055 100644 --- a/index.bs +++ b/index.bs @@ -68,8 +68,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"); }; @@ -234,18 +234,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. @@ -274,6 +262,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. @@ -428,7 +428,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