時間の経過を調べる golang

package main

import (
	"fmt"
	"time"
)

func main() {
	now := time.Now() // 
	time.Sleep(time.Second * 3)

	a := time.Since(now).Milliseconds()

	fmt.Printf("経過: %vms\n", a) // 

}

C:\Users\ebata\yamaguchi\src_try1\others>go run .
経過: 3008ms

2022/11,江端さんの技術メモ

Posted by ebata