1
Fork 0

add time since startup to logs

This commit is contained in:
Conduitry 2024-04-04 20:00:32 -04:00
parent af0ed03467
commit 4f7f2ca7fe

View file

@ -1 +1,4 @@
export const log = (...args) => console.log(`[${new Date().toISOString()}]`, ...args);
export const log = (...args) => {
const s = performance.now() / 1000;
console.log(`[${new Date().toISOString()}] (${Math.floor(s / 60)}m${(s % 60 + 100.05 + '').slice(1, 5)}s)`, ...args);
};