From 699178f79506482cb319c84a033d7a45d50a76f9 Mon Sep 17 00:00:00 2001 From: "Paul Buetow (europa)" Date: Mon, 1 Jun 2015 22:39:24 +0100 Subject: Bug fixes --- Makefile | 2 ++ gotop/main.go | 2 +- utils/utils.go | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 172b1e7..66a1091 100644 --- a/Makefile +++ b/Makefile @@ -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 -- cgit v1.2.3