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") });