Adding program timer to the program (#1)
Co-authored-by: Eoghan Conlon <git@eoghanconlon.ie> Reviewed-on: https://forgejo.skynet.ie///eoghanconlon73/AoC2016_GoLang/pulls/1
This commit is contained in:
parent
6bacc5c2b6
commit
38a3174e03
1 changed files with 13 additions and 3 deletions
16
src/main.go
16
src/main.go
|
@ -1,10 +1,20 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
input := FileParse("input/test.txt")
|
||||
for _, s := range input {
|
||||
start := time.Now()
|
||||
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.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))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue