//go:build cgo && (freebsd || openbsd) package hinters /* #include #include #include #include time_t getuptime() { struct timespec tp; clock_gettime(CLOCK_UPTIME, &tp); return tp.tv_sec; } */ import "C" func getUptime() int64 { time := C.getuptime() return int64(time) }