-def give_time(time):
+def give_time(time, nocolor=False):
"""Converts time in seconds to human readable form"""
+ global green_start, color_stop
+
+ if nocolor == True:
+ green_start = ""
+ color_stop = ""
+
days = time/(3600*24)
hours = (days - int(days))*24
minutes = (hours - int(hours))*60
pseconds = (green_start + str(seconds) +
color_stop + " seconds ")
+ green_start = "\033[32m"
+ color_stop = "\033[m"
+
return (pdays + phours + pminutes + pseconds)