Calulating Elapsed Time of any EXE

This is a discussion on Calulating Elapsed Time of any EXE within the C++ Programming forums, part of the General Programming Boards category; Hi, Iam new to this message board. I just want a C++ application to calculate the elapsed time between the ...

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    1

    Question Calulating Elapsed Time of any EXE

    Hi,
    Iam new to this message board. I just want a C++ application to calculate the elapsed time between the starting time and ending time of any application (EXE) running background. I will be grateful if anyone can help me with source code. Eagerly expecting your replies.

  2. #2
    Registered User
    Join Date
    Sep 2001
    Location
    Australia
    Posts
    212
    include the header file time.h for C
    Code:
    printf("The running time is: %lf\n",(double)clock()/(double)CLOCKS_PER_SEC);
    include the ctime header file for C++
    Code:
    cout<<"The running time is: " << ( (double)clock() / (double)CLOCKS_PER_SEC ) << endl;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Weird Times I'm getting
    By afflictedd2 in forum Linux Programming
    Replies: 8
    Last Post: 07-23-2008, 08:18 AM
  2. What is the best way to record a process execution time?
    By hanash in forum Linux Programming
    Replies: 7
    Last Post: 03-15-2006, 07:17 AM
  3. Read and set\change system time
    By Hexxx in forum C++ Programming
    Replies: 9
    Last Post: 01-02-2006, 07:11 AM
  4. relating date....
    By Prakash in forum C Programming
    Replies: 3
    Last Post: 09-19-2001, 10:08 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21