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 ?

shouldnt this be correct

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

or what is the correctway ?

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 = datetime.datetime.now()
    first_task()

    # end time
    end = datetime.datetime.now()

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

if __name__ == '__main__':
    main()
This question has already been answered. Start a new discussion instead.