Commit 20656856 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick

runtime: use monotonic time on NetBSD

Fixes #6007

Change-Id: I239a1699122e086e907ac1f18b1c86a650e1438a
Reviewed-on: https://go-review.googlesource.com/81135
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent bd983a6d
...@@ -164,7 +164,7 @@ TEXT runtime·walltime(SB), NOSPLIT, $32 ...@@ -164,7 +164,7 @@ TEXT runtime·walltime(SB), NOSPLIT, $32
// void nanotime(int64 *nsec) // void nanotime(int64 *nsec)
TEXT runtime·nanotime(SB),NOSPLIT,$32 TEXT runtime·nanotime(SB),NOSPLIT,$32
LEAL 12(SP), BX LEAL 12(SP), BX
MOVL $0, 4(SP) // arg 1 - clock_id MOVL $3, 4(SP) // arg 1 - clock_id CLOCK_MONOTONIC
MOVL BX, 8(SP) // arg 2 - tp MOVL BX, 8(SP) // arg 2 - tp
MOVL $427, AX // sys_clock_gettime MOVL $427, AX // sys_clock_gettime
INT $0x80 INT $0x80
......
...@@ -188,7 +188,7 @@ TEXT runtime·walltime(SB), NOSPLIT, $32 ...@@ -188,7 +188,7 @@ TEXT runtime·walltime(SB), NOSPLIT, $32
RET RET
TEXT runtime·nanotime(SB),NOSPLIT,$32 TEXT runtime·nanotime(SB),NOSPLIT,$32
MOVQ $0, DI // arg 1 - clock_id MOVQ $3, DI // arg 1 - clock_id CLOCK_MONOTONIC
LEAQ 8(SP), SI // arg 2 - tp LEAQ 8(SP), SI // arg 2 - tp
MOVL $427, AX // sys_clock_gettime MOVL $427, AX // sys_clock_gettime
SYSCALL SYSCALL
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment