diff options
author | Marvin Borner | 2020-12-13 12:35:33 +0100 |
---|---|---|
committer | Marvin Borner | 2020-12-13 12:35:33 +0100 |
commit | fc4981e3ea863632c88e5f0b308ae4532d077e49 (patch) | |
tree | 811a1d2c09cd811764fb8c3c09099a876beb0e7f /2020/07 | |
parent | f476fb5eaf30254dcb9e480f27f52b207147e207 (diff) |
Added execution timers
Diffstat (limited to '2020/07')
-rw-r--r-- | 2020/07/solve.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/2020/07/solve.js b/2020/07/solve.js index 28359e6..c4bbfae 100644 --- a/2020/07/solve.js +++ b/2020/07/solve.js @@ -1,3 +1,4 @@ +const { _, performance } = require("perf_hooks"); const fs = require("fs"); const data = fs.readFileSync("input", "utf8").split('\n'); @@ -45,5 +46,8 @@ function partTwo() return countBags(map, "shiny gold"); } +const tic = performance.now(); console.log(partOne()); console.log(partTwo()); +const toc = performance.now(); +console.log("TIME: " + ((toc - tic) / 1000).toFixed(6) + " seconds"); |