I really interested in how much time is spending time to do this action. Does anybody have any best idea? or any library. I did with simple way, but it seems as wrong way. Because I did have more experience with workin on go
My have that code:
package main
import (
"fmt"
"time"
)
func main() {
var d int = 0
var beginTime = time.Now()
for i := 0; i < 100000; i++ {
for c := 0; c < 100; c++ {
d = 1
}
}
var endTime = time.Now()
fmt.Println(beginTime, endTime)
fmt.Println(time.Since(beginTime))
fmt.Println(d)
}