Skip to content

Commit 381fb9a

Browse files
authored
Update 04.3.md
1 parent 0668c35 commit 381fb9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chapter04/04.3.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func Now() Time {
4343
now() 的具体实现在 `runtime` 包中,以 linux/amd64 为例,在 sys_linux_amd64.s 中的 `time · now`,这是汇编实现的:
4444

4545
* 调用系统调用 `clock_gettime` 获取时钟值(这是 POSIX 时钟)。其中 clockid_t 时钟类型是 CLOCK_REALTIME,也就是可设定的系统级实时时钟。得到的是 struct timespec 类型。(可以到纳秒)
46-
* 如果 `clock_gettime` 不存在,则使用精度差些的系统调用 `gettimeofday`。得到的是 struct timeval 类型。(最多到微妙
46+
* 如果 `clock_gettime` 不存在,则使用精度差些的系统调用 `gettimeofday`。得到的是 struct timeval 类型。(最多到微秒
4747

4848
*注意:* 这里使用了 Linux 的 vdso 特性,不了解的,可以查阅相关知识。
4949

0 commit comments

Comments
 (0)