From e0fff4b4d52bce129f2109be23aab75b49d8cd0a Mon Sep 17 00:00:00 2001 From: Tobias Berger Date: Wed, 16 Dec 2020 12:02:17 +0100 Subject: [PATCH] Update Template Signed-off-by: Tobias Berger --- JS/template/solution_a.mjs | 4 +++- JS/template/solution_b.mjs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/JS/template/solution_a.mjs b/JS/template/solution_a.mjs index 9fa55b8..3bcfb1c 100644 --- a/JS/template/solution_a.mjs +++ b/JS/template/solution_a.mjs @@ -1,7 +1,7 @@ import fs from "fs"; /** - * Main function for Puzzle A + * Main function for Part 1 * * @param {string} data - Puzzle input as a single string. */ @@ -10,6 +10,8 @@ async function main(data) { } fs.readFile("input", (err, data) => { + console.time("Part 1") if (err) throw err; main(data.toString()).then(console.log).catch(console.error); + console.timeEnd("Part 1") }); diff --git a/JS/template/solution_b.mjs b/JS/template/solution_b.mjs index c8527a4..85da964 100644 --- a/JS/template/solution_b.mjs +++ b/JS/template/solution_b.mjs @@ -1,7 +1,7 @@ import fs from "fs"; /** - * Main function for Puzzle B + * Main function for Part 2 * * @param {string} data - Puzzle input as a single string. */ @@ -10,6 +10,8 @@ async function main(data) { } fs.readFile("input", (err, data) => { + console.time("Part 2") if (err) throw err; main(data.toString()).then(console.log).catch(console.error); + console.timeEnd("Part 2") });