Timer w Golang
package main
import (
"time"
"fmt"
)
func main() {
startTime := time.Now()
// Do something
time.Sleep(3 *time.Second)
endTime := time.Now()
elapsedTime := endTime.Sub(startTime).Seconds()
fmt.Printf("It took %f seconds\n", elapsedTime)
}
Andrew Patton