From 1b9676c68e4c0b520c17d38d0021484bb664b4a2 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Sun, 4 Aug 2024 14:01:34 +0700 Subject: [PATCH] MISC: Clarify deprecation warning of ns.getTimeSinceLastAug() (#1535) --- src/NetscriptFunctions.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index e38b5fb6a..7f3c09297 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -1633,7 +1633,11 @@ export const ns: InternalAPI = { return convertTimeMsToTimeElapsedString(milliseconds, milliPrecision); }, getTimeSinceLastAug: () => () => { - deprecationWarning("ns.getTimeSinceLastAug()", "Use ns.getResetInfo().lastAugReset instead."); + deprecationWarning( + "ns.getTimeSinceLastAug()", + "Use `Date.now() - ns.getResetInfo().lastAugReset` instead. Please note that ns.getResetInfo().lastAugReset does NOT return the " + + "same value as ns.getTimeSinceLastAug(). Check the NS API documentation for details.", + ); return Player.playtimeSinceLastAug; }, alert: (ctx) => (_message) => {