How do you time a function in Go and return its runtime in milliseconds?

前端 未结 5 738
清酒与你
清酒与你 2021-01-31 03:10

How do you time a function in Go and return its runtime in milliseconds?

5条回答
  •  猫巷女王i
    2021-01-31 03:35

    There are several options for timestamping and timers in the time package. See the documentation here: http://golang.org/pkg/time/

提交回复
热议问题