14 lines
190 B
Go
14 lines
190 B
Go
|
//go:build cgo && (linux || netbsd)
|
||
|
|
||
|
package hinters
|
||
|
|
||
|
import (
|
||
|
"syscall"
|
||
|
)
|
||
|
|
||
|
func getUptime() int64 {
|
||
|
sysInfo := &syscall.Sysinfo_t{}
|
||
|
_ = syscall.Sysinfo(sysInfo)
|
||
|
return sysInfo.Uptime
|
||
|
}
|