From b9d13063ac039eb0e4b7db2a3ada866b72851ade Mon Sep 17 00:00:00 2001 From: Jesse Clark Date: Sun, 17 Sep 2023 12:40:25 -0700 Subject: [PATCH] Format time in ns.sleep and ns.asleep (#806) --- src/NetscriptFunctions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index 8f5c8e266..2fe712dc6 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -236,7 +236,7 @@ export const ns: InternalAPI = { (ctx) => (_time = 0) => { const time = helpers.number(ctx, "time", _time); - helpers.log(ctx, () => `Sleeping for ${time} milliseconds`); + helpers.log(ctx, () => `Sleeping for ${convertTimeMsToTimeElapsedString(time, true)}.`); return helpers.netscriptDelay(ctx, time).then(function () { return Promise.resolve(true); }); @@ -245,7 +245,7 @@ export const ns: InternalAPI = { (ctx) => (_time = 0) => { const time = helpers.number(ctx, "time", _time); - helpers.log(ctx, () => `Sleeping for ${time} milliseconds`); + helpers.log(ctx, () => `Sleeping for ${convertTimeMsToTimeElapsedString(time, true)}.`); return new Promise((resolve) => setTimeout(() => resolve(true), time)); }, grow: