This commit is contained in:
Babak Farrokhi 2019-05-07 14:50:03 +02:00
parent c2ea7d14a0
commit 9a0ae2ae8b
Signed by: farrokhi
GPG Key ID: 6B267AD85D632E9A

View File

@ -16,12 +16,12 @@ func main() {
p, _ := process.NewProcess(int32(*flagPID))
v, err := p.Times()
cnt:=0
cnt := 0
for {
if *flagNUM >= 0 && cnt >= *flagNUM {
os.Exit(0)
}
if *flagNUM >= 0 && cnt >= *flagNUM {
os.Exit(0)
}
if err == nil {
fmt.Printf("%d pid: %d user: %f\t system: %f\n", time.Now().Unix(), *flagPID, v.User, v.System)