python's datetime.timedelta for bash -


is there in bash similar construction in python:

start_time = time.time() target() print datetime.timedelta( seconds= int(time.time() - start_time) ) 

?

i'm looking wrapper datetime.timedelta.

i mean, easy construction: one/two line, give same result, days/hours:minutes:seconds

running below time execution of script wish time.

time script 

for example:

time python my_script.py 

will time how long script runs, independant of python itself. time ls -la ., time cat a_long_file, time du -h etc...

source


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -