Skip to content

Commit

Permalink
transfer currTime after ntpTime
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksii Samokhvalov committed Sep 20, 2020
1 parent 0dab986 commit b71fa16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw01_hello_now/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
)

func main() {
currTime := time.Now()
ntpTime, err := ntp.Time("0.beevik-ntp.pool.ntp.org")
if err != nil {
log.Fatal("Error:\n", err)
}
currTime := time.Now()

fmt.Printf("current time: %v\nexact time: %v\n", currTime.Round(0), ntpTime.Round(0))
}

0 comments on commit b71fa16

Please sign in to comment.