You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to see the total runtime of the last command in human readable format in the prompt if it took more then a couple of seconds to run.
If someone runs time heavy tasks then it may improve efficiency and it can be automatic and stay hidden if no heavy tasks have been run. An implementation for converting seconds to human format:
def time_human( sec )
res = nil
mul = 1.0
[ [60,"s"], [60,"m"], [24,"h"], [30.4375,"d"], [12,"mo"], [-1,"y"] ].each{|time,text|
mul *= time
if sec < mul or time < 0
res = "#{ round( sec.to_f * time / mul ) }#{ text }"
break
end
}
return res
end
The text was updated successfully, but these errors were encountered:
It would be nice to see the total runtime of the last command in human readable format in the prompt if it took more then a couple of seconds to run.
If someone runs time heavy tasks then it may improve efficiency and it can be automatic and stay hidden if no heavy tasks have been run. An implementation for converting seconds to human format:
The text was updated successfully, but these errors were encountered: