mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
round cpu exec time
This commit is contained in:
@@ -11,8 +11,8 @@ class JobMetricFormatter(object):
|
||||
def seconds_to_str(value):
|
||||
"""Convert seconds to a simple simple string describing the amount of time."""
|
||||
if value < 60:
|
||||
return "%s seconds" % value
|
||||
return "%s seconds" % round(value, 2)
|
||||
elif value < 3600:
|
||||
return "%s minutes" % (value / 60)
|
||||
return "%s minutes" % round(value / 60, 2)
|
||||
else:
|
||||
return "%s hours and %s minutes" % (value / 3600, (value % 3600) / 60)
|
||||
return "%s hours and %s minutes" % (round(value / 3600, 2), round((value % 3600) / 60, 2))
|
||||
|
||||
Reference in New Issue
Block a user