deepakabc
asked on
how calculate esitmated time of a process
how to calculate esitmated time for a python program. .. how can i do that like cpu speed or something else i don't have any idea please help me out
ASKER
using windows and internet explorer ...
how do i do in windows.. can give me rough program or any example on internet or something like that
how do i do in windows.. can give me rough program or any example on internet or something like that
Get the time at the start and end of the program, and print the difference.
tf1 = time.strftime("%b %d %Y %H:%M:%S")
tt1 = time.strptime(tf1, "%b %d %Y %H:%M:%S" )
t1 = time.mktime(tt1)
...... you program code
tf2 = time.strftime("%b %d %Y %H:%M:%S")
tt2 = time.strptime(tf2, "%b %d %Y %H:%M:%S" )
t2 = time.mktime(tt2)
t2 -t1 // no. of seconds elapsed.
tf1 = time.strftime("%b %d %Y %H:%M:%S")
tt1 = time.strptime(tf1, "%b %d %Y %H:%M:%S" )
t1 = time.mktime(tt1)
...... you program code
tf2 = time.strftime("%b %d %Y %H:%M:%S")
tt2 = time.strptime(tf2, "%b %d %Y %H:%M:%S" )
t2 = time.mktime(tt2)
t2 -t1 // no. of seconds elapsed.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
look for manual page of time for more information and format of the outpuy