๐Ÿ“ฆ payloadcms / next-payload

๐Ÿ“„ timestamp.ts ยท 6 lines
1
2
3
4
5
6export 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}`);
};