mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-29 21:36:43 -04:00
unix: add SysctlClockinfo on dragonfly and freebsd
Change-Id: I0d439b5c59c79594c6ecfebe0375971e1344cc09 Reviewed-on: https://go-review.googlesource.com/c/sys/+/213400 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
ef85f5a75d
commit
548cf772de
@@ -64,3 +64,12 @@ func TestSysctlUint32(t *testing.T) {
|
||||
}
|
||||
t.Logf("kern.maxproc: %v", maxproc)
|
||||
}
|
||||
|
||||
func TestSysctlClockinfo(t *testing.T) {
|
||||
ci, err := unix.SysctlClockinfo("kern.clockrate")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Logf("tick = %v, hz = %v, profhz = %v, stathz = %v",
|
||||
ci.Tick, ci.Hz, ci.Profhz, ci.Stathz)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user