Is there any way to start an application with python and count how much time does it take to completely load,

any idea if I can do it with os.syste, or subprocess.Popen ?

Recommended Answers

All 5 Replies

import datetime

shouldnt this be correct

dif = - datetime.datetime("18:56:18.867128")

or what is the correctway ?

well I am on python 2.7

simple example
# Simple Example

import datetime

def first_task():
    count_loop = 0
    while count_loop <> 100000000:
      a = 2**38
      count_loop += 1

def main():
    """ main() = none
    # start time
    start =

    # end time
    end =

    # total time taken
    total_time = end - start
    print 'Total_Time: %s' % total_time

if __name__ == '__main__':
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.