Download next.js/examples/cms-payload/utilities/timestamp.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 253 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-payload/utilities/timestamp.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/examples/cms-payload/utilities/timestamp.ts
-
curl -L -o timestamp.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/examples/cms-payload/utilities/timestamp.ts
253 Bytes
| export const timestamp = (label) => { | |
| if (!process.env.PAYLOAD_TIME) | |
| process.env.PAYLOAD_TIME = String(new Date().getTime()); | |
| const now = new Date(); | |
| console.log( | |
| `[${now.getTime() - Number(process.env.PAYLOAD_TIME)}ms] ${label}`, | |
| ); | |
| }; | |