add time since startup to logs
This commit is contained in:
parent
af0ed03467
commit
4f7f2ca7fe
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue