From 93f0068cbff71abb56f1e9004ef5a19ff8f18a98 2008-01-19 13:22:54 From: vivainio Date: 2008-01-19 13:22:54 Subject: [PATCH] %tasks shows elapsed time in min:sec --- diff --git a/IPython/Extensions/jobctrl.py b/IPython/Extensions/jobctrl.py index b79f702..9f87121 100755 --- a/IPython/Extensions/jobctrl.py +++ b/IPython/Extensions/jobctrl.py @@ -97,7 +97,8 @@ def magic_tasks(self,line): if not ents: print "No tasks running" for pid,cmd,cwd,t in ents: - print "%d: '%s' (%s)" % (pid,cmd,cwd) + dur = int(time.time()-t) + print "%d: '%s' (%s) %d:%02d" % (pid,cmd,cwd, dur / 60,dur%60) def magic_kill(self,line): """ Kill a task