working on timestamps and make netscript function highlight more specific.

This commit is contained in:
Olivier Gagnon
2021-11-11 10:07:16 -05:00
parent 1e7da4c610
commit 3f28b066b0
6 changed files with 20 additions and 15 deletions
+3 -3
View File
@@ -8,7 +8,7 @@ import { IMap } from "../types";
import { Terminal } from "../Terminal";
import { Generic_fromJSON, Generic_toJSON, Reviver } from "../utils/JSONReviver";
import { getTimestamp } from "../utils/helpers/getTimestamp";
import { formatTime } from "../utils/helpers/formatTime";
export class RunningScript {
// Script arguments
@@ -74,8 +74,8 @@ export class RunningScript {
}
let logEntry = txt;
if (Settings.EnableTimestamps) {
logEntry = "[" + getTimestamp() + "] " + logEntry;
if (Settings.TimestampsFormat) {
logEntry = "[" + formatTime(Settings.TimestampsFormat) + "] " + logEntry;
}
this.logs.push(logEntry);