diff options
| author | Paul Buetow (europa) <paul@buetow.org> | 2015-06-01 22:39:24 +0100 |
|---|---|---|
| committer | Paul Buetow (europa) <paul@buetow.org> | 2015-06-01 22:39:24 +0100 |
| commit | 699178f79506482cb319c84a033d7a45d50a76f9 (patch) | |
| tree | 76ae44edf62c3aa4086572cf39a456ea56db75b7 | |
| parent | e905f478c9e35962b444ccb4fc6e02fc97304531 (diff) | |
Bug fixes
| -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 |
