Include timing information

This commit is contained in:
bluepython508
2023-12-11 13:45:15 +00:00
parent 753635b38e
commit e9367fd784

View File

@@ -4,9 +4,12 @@ defmodule Aoc2023 do
import Aoc2023.Common
def main(input) do
parsed = parse(input)
IO.puts("Part 1: #{part1(parsed)}")
IO.puts("Part 2: #{part2(parsed)}")
{took, _} = :timer.tc fn ->
parsed = parse(input)
IO.puts("Part 1: #{part1(parsed)}")
IO.puts("Part 2: #{part2(parsed)}")
end
IO.puts("Took #{took / 1_000}ms")
end
end
end