summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow (europa) <paul@buetow.org>2015-06-01 22:39:24 +0100
committerPaul Buetow (europa) <paul@buetow.org>2015-06-01 22:39:24 +0100
commit699178f79506482cb319c84a033d7a45d50a76f9 (patch)
tree76ae44edf62c3aa4086572cf39a456ea56db75b7
parente905f478c9e35962b444ccb4fc6e02fc97304531 (diff)
Bug fixes
-rw-r--r--Makefile2
-rw-r--r--gotop/main.go2
-rw-r--r--utils/utils.go4
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