Adding program timer to the program #1

Merged
eoghanconlon73 merged 3 commits from timer into main 2024-08-23 11:35:37 +00:00

View file

@ -1,10 +1,20 @@
package main package main
import "fmt" import (
"fmt"
"time"
)
func main() { func main() {
input := FileParse("input/test.txt") start := time.Now()
for _, s := range input { fmt.Println("Day 1.....")
D1_start := time.Now()
sample_input := FileParse("input/day01/sample.txt")
fmt.Printf("Input parsing (%v).....\n", time.Since(D1_start))
for _, s := range sample_input {
fmt.Println(s) fmt.Println(s)
} }
fmt.Printf("Day 1 took %v to run\n", time.Since(D1_start))
fmt.Println("End of AoC code")
fmt.Printf("This took %v to run", time.Since(start))
} }