Update chromedp to fix console errors (#1521)

This commit is contained in:
peolic
2021-06-23 01:05:58 +03:00
committed by GitHub
parent ae3400a9b1
commit be2fe1de26
526 changed files with 55061 additions and 30300 deletions

34
vendor/github.com/chromedp/sysutil/sysutil_linux.go generated vendored Normal file
View File

@@ -0,0 +1,34 @@
// +build linux
package sysutil
import (
"bytes"
"io/ioutil"
"strconv"
"time"
)
var (
btimePrefix = []byte("btime ")
lineEnd = []byte("\n")
)
func init() {
buf, err := ioutil.ReadFile("/proc/stat")
if err != nil {
btime = time.Now()
return
}
for _, line := range bytes.SplitN(buf, lineEnd, -1) {
if bytes.HasPrefix(line, btimePrefix) {
t, err := strconv.ParseInt(string(line[len(btimePrefix):]), 10, 64)
if err != nil {
btime = time.Now()
return
}
btime = time.Unix(t, 0)
break
}
}
}