Link to home
Start Free TrialLog in
Avatar of deepakabc
deepakabcFlag for Australia

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
Avatar of praveen_mundlapati
praveen_mundlapati
Flag of Australia image

If you are using the linux operating system. use "time" command.

look for manual page of time for more information and format of the outpuy
Avatar of deepakabc

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
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.

ASKER CERTIFIED SOLUTION
Avatar of pepr
pepr

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial