Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan committed Jun 6, 2024
1 parent 4295770 commit 2b6d075
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions host/host_aix.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,13 @@ func UptimeWithContext(ctx context.Context) (uint64, error) {
return 0, fmt.Errorf("expected 'hours:minutes,' format but got '%s'", ut[4])
}

// Parse hours
hours, err = strconv.ParseUint(hm[0], 10, 64)
if err != nil {
return 0, err
}

// Remove trailing comma from minutes and parse
minutes, err = strconv.ParseUint(strings.Replace(hm[1], ",", "", -1), 10, 64)
if err != nil {
return 0, err
Expand Down

0 comments on commit 2b6d075

Please sign in to comment.