difftime? i have a ?

This is a discussion on difftime? i have a ? within the C Programming forums, part of the General Programming Boards category; I was asked this ?. The tool that tells you what % of execution time is being used by each ...

  1. #1
    TransparentMember correlcj's Avatar
    Join Date
    Jun 2002
    Posts
    378

    Exclamation difftime? i have a ?

    I was asked this ?. The tool that tells you what % of execution time is being used by each function in your program is:

    my ? is the answer profile or difftime?

    i said profile becuase when i looked up difftime, it said it took the difference between 2 integers but someone told me i was still wrong. Can anyone please explain why its difftime besides the definition i seen in the libro.
    Thanks!
    cj
    Last edited by correlcj; 08-12-2002 at 05:58 PM.

  2. #2
    moi
    moi is offline
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    djgpp 2.01 or 2.02, i forget which:
    Syntax
    #include <time.h>

    double difftime(time_t t1, time_t t0);

    Description
    This function returns the difference in time, in seconds, from t0 to t1.

    Return Value
    The number of seconds.

    Example
    Code:
    time_t t1, t0;
    double elapsed;
    time(&t0);
    do_something();
    time(&t1);
    elapsed = difftime(t1, t0);
    hello, internet!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Counter (Time)
    By PickleBranston in forum C Programming
    Replies: 16
    Last Post: 02-10-2009, 12:00 PM
  2. memory leaks
    By TehOne in forum C Programming
    Replies: 4
    Last Post: 10-10-2008, 09:33 PM
  3. Calculating execution using difftime
    By Finesse in forum C Programming
    Replies: 1
    Last Post: 11-29-2004, 12:26 PM
  4. difftime issues
    By mmyers1 in forum C++ Programming
    Replies: 1
    Last Post: 04-20-2004, 01:08 PM
  5. Help: using time difftime function
    By fe344 in forum C Programming
    Replies: 5
    Last Post: 11-13-2002, 07:08 PM

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