Skip to content

Commit 732bf17

Browse files
committed
Fix #522
1 parent 4e15378 commit 732bf17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jtop/core/processes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def get_process_info(self, pid, gpu_mem_usage, process_name, uptime):
106106
stime = float(stat[14])
107107
starttime = float(stat[21]) / self._clk_tck
108108
total_time = (utime + stime) / self._clk_tck
109-
proc_uptime = uptime - starttime
109+
proc_uptime = max(1, uptime - starttime)
110110
cpu_percent = 100 * (total_time / proc_uptime)
111111

112112
process = [

0 commit comments

Comments
 (0)