提交 54a6c186 编写于 作者: W WAKAYAMA shirou

host[freebsd]: BREAKING CHANGE. Boottime() should return uint64 same as other.

上级 0afd653f
......@@ -55,7 +55,7 @@ func HostInfo() (*HostInfoStat, error) {
return ret, nil
}
func BootTime() (int64, error) {
func BootTime() (uint64, error) {
values, err := common.DoSysctrl("kern.boottime")
if err != nil {
return 0, err
......@@ -63,7 +63,7 @@ func BootTime() (int64, error) {
// ex: { sec = 1392261637, usec = 627534 } Thu Feb 13 12:20:37 2014
v := strings.Replace(values[2], ",", "", 1)
boottime, err := strconv.ParseInt(v, 10, 64)
boottime, err := strconv.ParseUint(v, 10, 64)
if err != nil {
return 0, err
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册