aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/main.go b/main.go
index 830af03..ed1d2dd 100644
--- a/main.go
+++ b/main.go
@@ -21,6 +21,12 @@ import (
)
func main() {
+ start := time.Now().Round(time.Second)
+ defer func() {
+ end := time.Now().Round(time.Second)
+ log.Printf("INFO: measurement duration was %v\n", end.Sub(start))
+ }()
+
opts := options.Parse()
cli := &http.Client{
Transport: &http.Transport{
@@ -48,12 +54,6 @@ func main() {
ctx, cancel := context.WithCancel(bg)
defer cancel()
- start := time.Now().Round(time.Second)
- defer func() {
- end := time.Now().Round(time.Second)
- log.Printf("INFO: measurement duration was %v\n", end.Sub(start))
- }()
-
log.Printf("INFO: ctrl+C to exit prematurely\n")
go func() {
wg.Add(1)