mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-04 12:52:28 +08:00
feat: add TrackFuncTime in datetime package
This commit is contained in:
@@ -408,3 +408,17 @@ func ExampleIsWeekend() {
|
||||
// true
|
||||
// false
|
||||
}
|
||||
|
||||
// func ExampleTrackFuncTime() {
|
||||
// defer TrackFuncTime(time.Now())()
|
||||
|
||||
// var n int
|
||||
// for i := 0; i < 5000000; i++ {
|
||||
// n++
|
||||
// }
|
||||
|
||||
// fmt.Println(1)
|
||||
|
||||
// // Output:
|
||||
// // 1
|
||||
// }
|
||||
|
||||
Reference in New Issue
Block a user