Go-time-库
两个时间概念:
- Wall clock, 指真实时间, 就像墙上的挂钟上看到的时间一样
- Monotonic clock, 指一个递增的计时器, 可以用于测量时间
type Duration
1 |
|
指两个 instants 之间的 elapsed time.
常见的有:
time.Microsecond
time.Millisecond
time.Second
time.Minute
time.Hour
type Time
用于标记类型的空结构体:
1 |
|
Go-time-库
http://example.com/2024/02/18/Go-time-库/