Announcement

Collapse
No announcement yet.

TIX -> QueryPerformanceCounter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • TIX -> QueryPerformanceCounter

    I assumed when I saw TIX/END TIX that it would be using QueryPerformanceCounter internally (or the equivalent ASM instruction which escapes me now). This doesn't appears to be the case though. I've replaced QueryPerformanceCounter with TIX in a system and the numerical results returned are radically different, often times displaying negative values as though negative time had passed between two events. Does anyone have some insight into how TIX/END TIX works? QueryPerformanceCounter is supposed to access the same high resolution CPU cycle counter that I thought TIX would use. Where am I wrong?
    Todd Wasson
    http://PerformanceSimulations.Com
    PowerBasic Racing Simulator (October 2007 clip - 15.1MB wmv file) http:http://www.performancesimulations.co...m-GenIV-12.wmv

  • #2
    Todd,
    TIX uses the CPU time stamp counter which runs at CPU clock frequency (GHz and up)
    QueryPerformanceCounter uses the internal timer chips which usually run at about 1.7MHz or 3.5MHz

    Paul.

    Comment


    • #3
      Nevermind this thread. I made a mistake. Feel free to delete it
      Todd Wasson
      http://PerformanceSimulations.Com
      PowerBasic Racing Simulator (October 2007 clip - 15.1MB wmv file) http:http://www.performancesimulations.co...m-GenIV-12.wmv

      Comment


      • #4
        Wrote mine while you were posting yours, Paul. Thanks. I made two mistakes then.

        QueryPerformanceFrequency on my laptop returns over 14Mhz, btw..
        Todd Wasson
        http://PerformanceSimulations.Com
        PowerBasic Racing Simulator (October 2007 clip - 15.1MB wmv file) http:http://www.performancesimulations.co...m-GenIV-12.wmv

        Comment


        • #5
          The QueryPerformanceFrequency seems not to have any significance to measure the frequency of the processor. I got only one true value. See the results:

          Code:
              type / motherboard        processor / frequency         QueryPerfFreq   sysinfo
          ------------------------------------------------------------------------------------
          - nb HP Pavilion DV4 1222 & AMD Turion X2 64bit 2.1 GHz ..:    14,282,268 - 2100 MHz
          - pc Intel D865perl       & Intel P4 HT 2.8 GHz ..........: 2,793,050,000 - 2793 MHz (true)
          - pc Zida 4DPS 64MB       & AMD 486DX 133 MHz ............:     1,193,180 -  133 MHz
          - pc Asus K7M PC133       & AMD Athlon 1.0 GHz ...........:     1,193,182 - 1011 MHz
          - pc Asus P4M266A-8235    & Intel P4 2.27 GHz ............:     3,579,545 - 2270 MHz
          - pc Gigabyte 7VM400M-RZ  & AMD Sempron 1.6 GHz (2.3+) ...:     3,579,545 - 1598 MHz
          - pc ECS 761GX-M754 5.0   & AMD Sempron 1.4 GHz (2.5+) ...:     3,579,545 - 1403 MHz
          "The trouble with quotes on the Internet is that you can never know if they are genuine." - Abraham Lincoln.

          Comment

          Working...
          X