Thread: how do I determine the clocks per second on my machine?

  1. #1
    Registered User
    Join Date
    Jan 2004
    Posts
    2

    how do I determine the clocks per second on my machine?

    Hi

    The subject pretty much says it all. As far as I understood that, the constant

    #define CLK_TCK 1000.0

    given in time.h probably isnīt really how it is like on my machine. A faster CPU would do more clocks per second than a slower one, wouldnīt it? And if so, how can I determine the real value?

  2. #2
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    I believe that the clock length is constant regardless of CPU speed.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    If you're trying to find the Mhz of your processor, then it's going to be specific to your operating system and compiler.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. RAM upgrade
    By BobS0327 in forum Tech Board
    Replies: 6
    Last Post: 12-10-2008, 08:14 AM
  2. Replies: 4
    Last Post: 01-18-2008, 07:05 PM
  3. School Mini-Project on C/C++ (Need Your Help)..
    By EazTerence in forum C++ Programming
    Replies: 4
    Last Post: 09-08-2005, 01:08 AM
  4. Porting from 32 bit machine to 64 bit machine!
    By anoopks in forum C Programming
    Replies: 10
    Last Post: 02-25-2005, 08:02 PM
  5. Designing State Machine
    By axon in forum Tech Board
    Replies: 3
    Last Post: 11-06-2003, 12:13 PM