diff options
| -rw-r--r-- | Makefile | 2 | ||||
| -rw-r--r-- | gotop/main.go | 2 | ||||
| -rw-r--r-- | utils/utils.go | 4 |
3 files changed, 5 insertions, 3 deletions
@@ -6,3 +6,5 @@ docu: install sh -c '($(GOPATH)/bin/gotop -h 2>&1)|sed 1d > help.txt;exit 0' cross: goxc -bc="linux" +pub: + pub $(GOPATH)/bin/gotop diff --git a/gotop/main.go b/gotop/main.go index c597e32..9c7b2d8 100644 --- a/gotop/main.go +++ b/gotop/main.go @@ -65,7 +65,7 @@ func sortP(lastP *mapP) *list.List { for _, val := range *lastP { nowTimestamp := int32(time.Now().Unix()) - if val.first.Timestamp+2 < nowTimestamp { + if val.first.Timestamp+4 < nowTimestamp { // Schedule remove obsolete pids from lastP remove.PushBack(val.first.Id) // Display this process one more time, but in a fancy way diff --git a/utils/utils.go b/utils/utils.go index 1e9ce71..f80e09a 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -24,7 +24,7 @@ func Abs(x int) int { } func Human(x int) string { - units := []string{"k", "M", "G", "T", "P", "E", "Z", "Y"} + units := []string{" ", "k", "M", "G", "T", "P", "E", "Z", "Y"} f := float32(x) i := 0 @@ -37,7 +37,7 @@ func Human(x int) string { } func HumanBinary(x int) string { - units := []string{"k", "M", "G", "T", "P", "E", "Z", "Y"} + units := []string{" ", "k", "M", "G", "T", "P", "E", "Z", "Y"} f := float32(x) i := 0 |
