console: timeStamp() static method
Non-standard: This feature is not standardized. We do not recommend using non-standard features in production, as they have limited browser support, and may change or be removed. However, they can be a suitable alternative in specific cases where no standard option exists.
Note: This feature is available in Web Workers.
The console.timeStamp()
static method adds a single marker to the browser's Performance tool (Firefox bug 1387528, Chrome). This lets you correlate a point in your code with the other events recorded in the timeline, such as layout and paint events.
You can optionally supply an argument to label the timestamp, and this label will then be shown alongside the marker.
Syntax
js
console.timeStamp(label)
Parameters
label
Optional-
Label for the timestamp.
Return value
None (undefined
).