/
index.md
41 lines (28 loc) · 1.35 KB
/
index.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
title: "console: timeStamp() static method"
short-title: timeStamp()
slug: Web/API/console/timestamp_static
page-type: web-api-instance-method
status:
- non-standard
browser-compat: api.console.timeStamp_static
---
{{APIRef("Console API")}}{{Non-standard_header}} {{AvailableInWorkers}}
The **`console.timeStamp()`** static method adds a single marker to the browser's Performance tool ([Firefox](https://profiler.firefox.com/docs/#/), [Chrome](https://developer.chrome.com/docs/devtools/evaluate-performance/reference/)). 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-nolint
timeStamp(label)
```
### Parameters
- `label` {{Optional_Inline}}
- : Label for the timestamp.
### Return value
None ({{jsxref("undefined")}}).
## Browser compatibility
{{Compat}}
## See also
- {{domxref("console/time_static", "console.time()")}}
- {{domxref("console/timeLog_static", "console.timeLog()")}}
- {{domxref("console/timeEnd_static", "console.timeEnd()")}}
- [Adding markers with the console API](https://web.archive.org/web/20211207010020/https://firefox-source-docs.mozilla.org/devtools-user/performance/waterfall/index.html#adding-markers-with-the-console-api)