+ Reply to Thread
Results 1 to 2 of 2

Thread: How to get CPU speed programmatically?

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    27

    How to get CPU speed programmatically?

    I wan to calculate the speed of the CPU programmatically.

    How can I get this value? What APIs do I need to use?

    Please bring some ideas.

  2. #2
    Junior Member
    Join Date
    May 2012
    Posts
    29
    There are two approaches:

    Approach 1:
    Query the Value of below registry key:

    "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\Ce ntralProcessor\0\~MHz"

    In case you have multi-processor machine you will find more nodes under "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\Ce ntralProcessor\" node.

    But all the processor should have the same speed.

    Approach 2:
    Another way is to use QueryPerformanceCounter APIs.

    http://www.codeproject.com/Articles/...wo-simple-ways

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts