``` go
func Rem(a []string) (ret []string) {
now:=time.Now()
sort.Strings(a)
finish:=time.Since(now)
fmt.Println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
sss:=strconv.FormatInt(int64(finish),10)
fmt.Printf("%s",sss)
fmt.Println("sss:"+sss)
aaa:=int64(finish)
fmt.Println(aaa)
fmt.Println(int64(finish))
fmt.Println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!")
return ret
}
```
sss和aaa打印出来就是零,但是调试的时候sss和aaa明明就是有值的啊
我后来把执行体又加了个10000次循环,总算有值了,之前确实是因为执行时间太短了,所以一直显示零,但纳秒级别的为什么会为零呢,按理来说就算再短的代码执行量在纳秒下也应该有时间的。
#6
更多评论