我不明白我在这里做错了什么,这个错误,两者都是类型 syscall.Timeval Usec
谢谢
package common
import (
"syscall"
)
func getUsecSince(oldTime syscall.Timeval) (result uint64) {
now := syscall.Timeval{}
syscall.Gettimeofday(&now)
for now.Sec > oldTime.Sec {
result += 1000000
now.Sec--
}
return result + (now.Usec - oldTime.Usec)
}
./common.go:15: invalid operation: result + (now.Usec - oldTime.Usec)(类型不匹配的 uint64 和 int32)
繁花如伊
largeQ
慕莱坞森
相关分类