Win7: Enabling HPET, bcdedit /set useplatformclock true (command)


  1. ECH
    Posts : 63
    Win7
       #1

    Win7: Enabling HPET


    Hello,

    I would like some help to understand a few things about win7+ HPET and Bios+ HPET. To start it was my understanding that if you enabled HTEP in the bios win7 would automatically be using HTEP. However, I'm reading that it does not and will still use the Time Stamp Counter (TSC). So I'm not sure what point it would be enabling it from the bios.

    2ndly, using the command bcdedit /set useplatformclock true (then reboot) is said to enable HPET using Win 7. While bcdedit /deletevalue useplatformclock (then reboot) is said to remove it. To test to see if it's working or not you have to use either:
    A.
    Timer Function Performance (run the program before and after the tweak to see if the QueryPerformanceFrequency() freq value increased or not)
    B. WinTimerTester_1.1 (from UncleWebb to see if you have a 1.0000 ratio at or near 100 seconds)
    To see if it improves anything or not. From Unclewebbs post he addresses the use of SetFSB. From another point of view it helps improve slow connections when using this application from here.

    Should we be using Win7's HPET or stick to TSC for everyday use and gaming?
    Last edited by ECH; 06 Sep 2011 at 08:58.
      My Computer


  2. ECH
    Posts : 63
    Win7
    Thread Starter
       #2

    Can someone help me with this one?
      My Computer


  3. Posts : 24,479
    Windows 7 Ultimate X64 SP1
       #3

    Welcome back to Seven forums. I suspect your mean HPET, not HTEP?
    If so here is a Wiki on it. High Precision Event Timer - Wikipedia, the free encyclopedia
      My Computer


  4. Posts : 9,582
    Windows 8.1 Pro RTM x64
       #4

    Just tried it on my system (running W8 7989 64-bit), and you can see the difference.

    Code:
    Before
    
    Report file for timing the various timers.
    
    *** Key number is the avg time.
        The smaller this number, the faster the timer.
    
    
    QueryPerformanceFrequency() freq  = 0  2458572 
    
    
    method 0:
      QueryPerfCntr..()  100 times
      tot:   0 10
      avg:   0.100000
      avg time:             4.0674e-008
    method 0:
      QueryPerfCntr..()  500 times
      tot:   0 49
      avg:   0.098000
      avg time:             3.98605e-008
    method 0:
      QueryPerfCntr..()  1000 times
      tot:   0 98
      avg:   0.098000
      avg time:             3.98605e-008
    method 0:
      QueryPerfCntr..()  10000 times
      tot:   0 977
      avg:   0.097700
      avg time:             3.97385e-008
    
    
    
    method 1:
      GetTickCount()  100 times
      tot:   0 2
      avg:   0.020000
      avg time:             8.1348e-009
    method 1:
      GetTickCount()  500 times
      tot:   0 10
      avg:   0.020000
      avg time:             8.1348e-009
    method 1:
      GetTickCount()  1000 times
      tot:   0 19
      avg:   0.019000
      avg time:             7.72806e-009
    method 1:
      GetTickCount()  10000 times
      tot:   0 185
      avg:   0.018500
      avg time:             7.52469e-009
    
    
    
    method 2:
      TimeGetTime()  100 times
      tot:   0 31
      avg:   0.310000
      avg time:             1.26089e-007
    method 2:
      TimeGetTime()  500 times
      tot:   0 46
      avg:   0.092000
      avg time:             3.74201e-008
    method 2:
      TimeGetTime()  1000 times
      tot:   0 92
      avg:   0.092000
      avg time:             3.74201e-008
    method 2:
      TimeGetTime()  10000 times
      tot:   0 918
      avg:   0.091800
      avg time:             3.73387e-008
    
    
    
    method 3:
      Pentium internal high-freq cntr()  100 times
      tot:   0 8
      avg:   0.080000
      avg time:             3.25392e-008
    method 3:
      Pentium internal high-freq cntr()  500 times
      tot:   0 37
      avg:   0.074000
      avg time:             3.00988e-008
    method 3:
      Pentium internal high-freq cntr()  1000 times
      tot:   0 74
      avg:   0.074000
      avg time:             3.00988e-008
    method 3:
      Pentium internal high-freq cntr()  10000 times
      tot:   0 734
      avg:   0.073400
      avg time:             2.98547e-008
    Code:
    After
    
    Report file for timing the various timers.
    
    *** Key number is the avg time.
        The smaller this number, the faster the timer.
    
    
    QueryPerformanceFrequency() freq  = 0  14318180 
    
    
    method 0:
      QueryPerfCntr..()  100 times
      tot:   0 1652
      avg:   16.520000
      avg time:             1.15378e-006
    method 0:
      QueryPerfCntr..()  500 times
      tot:   0 8169
      avg:   16.338000
      avg time:             1.14107e-006
    method 0:
      QueryPerfCntr..()  1000 times
      tot:   0 16310
      avg:   16.310000
      avg time:             1.13911e-006
    method 0:
      QueryPerfCntr..()  10000 times
      tot:   0 163254
      avg:   16.325400
      avg time:             1.14019e-006
    
    
    
    method 1:
      GetTickCount()  100 times
      tot:   0 28
      avg:   0.280000
      avg time:             1.95556e-008
    method 1:
      GetTickCount()  500 times
      tot:   0 70
      avg:   0.140000
      avg time:             9.77778e-009
    method 1:
      GetTickCount()  1000 times
      tot:   0 119
      avg:   0.119000
      avg time:             8.31111e-009
    method 1:
      GetTickCount()  10000 times
      tot:   0 1099
      avg:   0.109900
      avg time:             7.67556e-009
    
    
    
    method 2:
      TimeGetTime()  100 times
      tot:   0 105
      avg:   1.050000
      avg time:             7.33333e-008
    method 2:
      TimeGetTime()  500 times
      tot:   0 287
      avg:   0.574000
      avg time:             4.00889e-008
    method 2:
      TimeGetTime()  1000 times
      tot:   0 546
      avg:   0.546000
      avg time:             3.81333e-008
    method 2:
      TimeGetTime()  10000 times
      tot:   0 5362
      avg:   0.536200
      avg time:             3.74489e-008
    
    
    
    method 3:
      Pentium internal high-freq cntr()  100 times
      tot:   0 56
      avg:   0.560000
      avg time:             3.91111e-008
    method 3:
      Pentium internal high-freq cntr()  500 times
      tot:   0 224
      avg:   0.448000
      avg time:             3.12889e-008
    method 3:
      Pentium internal high-freq cntr()  1000 times
      tot:   0 441
      avg:   0.441000
      avg time:             3.08e-008
    method 3:
      Pentium internal high-freq cntr()  10000 times
      tot:   0 4613
      avg:   0.461300
      avg time:             3.22178e-008
    Win7: Enabling HPET, bcdedit /set useplatformclock true (command)-capture.png

    I managed to stop the clock on 100.0 seconds. The ratio initially fluctuated between 0.9998 and 1.0002, but eventually settled to 1.0000 as shown, with only the occasional ±0.0001 deviation.
      My Computer


  5. ECH
    Posts : 63
    Win7
    Thread Starter
       #5

    Any information as to why HPET isn't enabled by default for win7?
      My Computer


  6. Posts : 1
    Windows 7 Professional 64 bit
       #6

    Hi,
    Sorry in advance for reviving this old (dead) thread. Since you guys seem to know what you are talking about I'll ask this question:

    Whenever I start up my system it gives me the error that HPET could not be enabled because of a BIOS Problem (ID 1). I checked my bios and saw that HPET was set to 32 bit although I am running Windows 7 Pro 64 bit. I changed the value and tried the command line to enable HPET. I rebooted and ran both of the aforementioned tests.

    Win Timer Tester 1.1 gives me a stable 1.0001 after about 30 seconds.
    Time Function Performance doesn't have significantly different values.

    I ran each test several times and it always gives me the same results whether I manually try to turn HPET on or off.

    I conclude that this means that for some reason Windows isn't able to start HPET and uses a different (but working) Timecode instead. Now I am totally puzzled about why this happens.

    I have a Gigabyte Mainboard Bios Version "Award Software FG" (23.11.2007).

    Small sidenote: All my programs etc. work fine, the reason I originally stumbled across the whole HPET thing was that I read that it can cause internet connection drops which I am experiencing randomly from time to time and that don't seem to be related to the ISP or my router settings.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 22:49.
Find Us