Source File
sysutil_linux.go
Belonging Package
github.com/chromedp/sysutil
// +build linuxpackage sysutilimport ()var (btimePrefix = []byte("btime ")lineEnd = []byte("\n"))func init() {, := ioutil.ReadFile("/proc/stat")if != nil {btime = time.Now()return}for , := range bytes.SplitN(, lineEnd, -1) {if bytes.HasPrefix(, btimePrefix) {, := strconv.ParseInt(string([len(btimePrefix):]), 10, 64)if != nil {btime = time.Now()return}btime = time.Unix(, 0)break}}}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |