mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-22 08:48:38 +00:00
(jsrt) fix: elapsed time calc
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
// Utility functions for JavaScript runtime
|
||||
|
||||
function logWithTimestamp(message) {
|
||||
const timestamp = new Date().toISOString();
|
||||
console.log(`[${timestamp}] ${message}`);
|
||||
function logWithReq(message) {
|
||||
let reqPath = req.url || 'unknown path';
|
||||
console.log(`[${req.method} ${reqPath}] ${message}`);
|
||||
}
|
||||
|
||||
function safeJsonParse(str, defaultValue = null) {
|
||||
|
||||
Reference in New Issue
Block a user