Re: accurate timer

From: Sigurd Stenersen (sigurds_at_utvikling.com)
Date: 09/17/04

  • Next message: ama: "Re: GetClientRect"
    Date: Fri, 17 Sep 2004 08:52:49 +0200
    
    

    GuitarBill wrote:
    > You're going to have to explain this further:
    >>> ...because you will spend more of your timeout period running loop
    >>> code.

    It's quite simple. If you use timeBeginPeriod() and Sleep() you give up the
    CPU while waiting. I think the same might be the case for
    CreateWaitableTimer(). On the other hand, if you're using
    QueryPerformanceCounter() what are you going to do while you wait for your
    timeout to expire ?

    I didn't say you WILL hog the CPU, I said you'll have to be real careful NOT
    to.

    -- 
    Sigurd
    http://utvikling.com
    

  • Next message: ama: "Re: GetClientRect"

    Relevant Pages

    • Re: resheduling after returning from system call
      ... Imagine a system call that took an enormous amount of CPU ... just let that run to completion without a context switch! ... But this one will sleep while waiting for getting read data from ...
      (comp.os.linux.development.system)
    • Re: Re-entrancy???
      ... Sleep calls will just slow the application down. ... Whether or not PeekMessage is occuring in DoEvents ... has no impact on the overall CPU utilization. ... correctly, using the timeXXXX-APIs. ...
      (microsoft.public.vb.general.discussion)
    • Re: cpufreq est and Enhanced Sleep (Cx) States for Intel Core and above
      ... Adam McDougall wrote: ... >> Another thing I wish could work is the Enhanced cpu Sleep States; ... The major reason being that the acpi cpu> driver does not support well multiprocessor systems. ... I've not updated the patch since then so> it might or might not apply cleanly to a recent current. ...
      (freebsd-current)
    • Re: Non-intel benchmarks on Conroe vs AMDs AM2 FX62
      ... Are you advocating waiting, for some future "shake-out" or price ... new and promising CPU? ... much better reason to wait than are future price reductions. ...
      (comp.sys.ibm.pc.hardware.chips)
    • Re: cpufreq est and Enhanced Sleep (Cx) States for Intel Core and above
      ... > Another thing I wish could work is the Enhanced cpu Sleep States; ... > this Dell Latitude D820 laptop only sees C1 although the document ... > acpi stuff and/or verbose boot logs if it would be helpful. ...
      (freebsd-current)