Day7 Time Measure
This commit is contained in:
parent
81cbc8ac8c
commit
96c4f48dfe
@ -17,6 +17,7 @@ type DirNode struct {
|
||||
func main() {
|
||||
args := os.Args[1:]
|
||||
lines := helper.ReadTextFile(args[0])
|
||||
defer helper.MeasureTime("Main")()
|
||||
root := DirNode{nil, 0, map[string]*DirNode{}}
|
||||
var currentNode *DirNode
|
||||
currentNode = &root
|
||||
|
@ -39,7 +39,7 @@ func MeasureTime(process string) func() {
|
||||
fmt.Printf("Start %s\n", process)
|
||||
start := time.Now()
|
||||
return func() {
|
||||
fmt.Printf("Time taken by %s is %v\n", process, time.Since(start))
|
||||
fmt.Printf("Time taken by %s is %v\n", process, time.Since(start).Nanoseconds())
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user