From 378438e4aa368c59eecd5083da938c8d9e85a48e Mon Sep 17 00:00:00 2001 From: tgpethan Date: Thu, 9 Jul 2020 00:37:28 +0100 Subject: [PATCH] Move time getting to correct place --- EUS.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EUS.js b/EUS.js index 67c5788..42b0e0d 100644 --- a/EUS.js +++ b/EUS.js @@ -281,8 +281,6 @@ function handleAPI(req, res) { sizeOfFolder = (size / 1024 / 1024 / 1024); jsonaa["space"]["usage"]["gb"] = sizeOfFolder; jsonaa["space"]["usage"]["string"] = spaceToLowest(size, true); - // Send the json to the requesting client - d = new Date(); endTime = d.getTime(); diskUsage.check(__dirname, (err, data) => { if (err) throw err; jsonaa["space"]["total"] = { @@ -293,6 +291,8 @@ function handleAPI(req, res) { string: spaceToLowest(data["total"], true) }; }); + // Send the json to the requesting client + d = new Date(); endTime = d.getTime(); global.modules.consoleHelper.printInfo(emoji.heavy_check, `${req.method}: ${chalk.green("[200]")} ${req.url} ${endTime - startTime}ms`); return res.end(JSON.stringify(jsonaa)); });