Thread: using time.h.......

  1. #1
    Registered User
    Join Date
    Apr 2002
    Posts
    3

    Question using time.h.......

    i need to include the elapsed time at the end of my program. does anyone know how i might go about doing this? It needs to be the time it takes from the beginning of the "game" to the end of it. thanks

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    Code:
    clock_t start, finish;
    start = clock();
    /* Program goes here */
    finish = clock();
    printf ( "Time elapsed: %u\n", finish - start );
    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. time.h
    By zensatori in forum C Programming
    Replies: 28
    Last Post: 04-15-2007, 06:39 PM
  2. Help with time.h functions please.
    By Ifurita. in forum C++ Programming
    Replies: 4
    Last Post: 05-20-2003, 03:58 AM
  3. time.h and miliseconds question
    By Diamonds in forum C++ Programming
    Replies: 10
    Last Post: 12-16-2002, 08:41 AM
  4. Replies: 2
    Last Post: 10-18-2002, 08:30 AM
  5. a time.h problem
    By Max in forum C Programming
    Replies: 14
    Last Post: 10-15-2002, 02:43 PM