Skip to content

Commit

Permalink
Moving timer start to right before command is run
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Walter committed Feb 21, 2019
1 parent be43351 commit 72758c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
)

func main() {
start := time.Now()
cmd := exec.Command(os.Args[1], os.Args[2:]...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
start := time.Now()
cmd.Run()
elapsed := time.Since(start)
color.New(color.FgMagenta).Printf("Time Elapsed: %s", elapsed)
Expand Down

0 comments on commit 72758c5

Please sign in to comment.