源码 非正数 取值范围 非正数处理

 

Go/src/builtin/builtin.go:52

// int64 is the set of all signed 64-bit integers.
// Range: -9223372036854775808 through 9223372036854775807.
type int64 int64

Go/src/time/time.go:590

 

// A Duration represents the elapsed time between two instants
// as an int64 nanosecond count. The representation limits the
// largest representable duration to approximately 290 years.
type Duration int64


package time

// Sleep pauses the current goroutine for at least the duration d.
// A negative or zero duration causes Sleep to return immediately.
func Sleep(d Duration)

Go/src/time/sleep.go:9

 

posted @ 2021-12-17 11:24  papering  阅读(49)  评论(0编辑  收藏  举报