Thread: time functions

  1. #1
    Registered User
    Join Date
    Feb 2003

    time functions

    why does this short piece of code result in a spectacular loop, followed by my crashed computer? I am using miracle c compiler:

    #include <stdio.h>
    #include <time.h>


    printf("\nProgram execution time using clock() = %ld hundredths of a second.", clock());


    many thanks to the person who canhelp!!

  2. #2
    Join Date
    Aug 2001
    Groningen (NL)
    A spectacular loop? I compiled, using GCC, and had no problems with it.

    Perhaps there is some problem with the clock() function, according to the standard the return value of the function is of type clock_t, but this is implementation defined. Which means, how this type is implemented, depends on how the manufacturer of the compiler implemented it.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. need help in time zone
    By Gong in forum C++ Programming
    Replies: 2
    Last Post: 01-03-2007, 04:44 AM
  2. Help with assignment!
    By RVDFan85 in forum C++ Programming
    Replies: 12
    Last Post: 12-03-2006, 12:46 AM
  3. The space time continueimnms mm... (rant)
    By Jeremy G in forum A Brief History of
    Replies: 32
    Last Post: 06-27-2004, 01:21 PM
  4. I apologize. Good bye.
    By doubleanti in forum A Brief History of
    Replies: 14
    Last Post: 05-03-2002, 06:51 PM
  5. help with functions (first time)
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 03-06-2002, 09:37 PM