Results 1 to 2 of 2

Thread: How to avoid 50- 99 % of CPU use for analog clock example with 10 ms (Painter ...)

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default How to avoid 50- 99 % of CPU use for analog clock example with 10 ms (Painter ...)

    If I change the timer interval to 10 ms (to have a chronometer) then the cpu spent 50-99% of CPU.
    I know that is related to MS windows, but anyone can tell me some trick?
    Must I try it with a thread ?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to avoid 50- 99 % of CPU use for analog clock example with 10 ms (Painter ..

    Quote Originally Posted by tonnot View Post
    I know that is related to MS windows, but anyone can tell me some trick?
    The trick is not to repaint the widget 100 times per second.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QObject and alarm clock
    By been_1990 in forum General Programming
    Replies: 2
    Last Post: 13th December 2009, 18:00
  2. QPainter and Qt analog clock example
    By Diph in forum Qt Programming
    Replies: 2
    Last Post: 25th September 2009, 18:34
  3. Customizable Analog clock general advice needed
    By been_1990 in forum Qt Programming
    Replies: 0
    Last Post: 21st September 2009, 19:17
  4. clock() function
    By mickey in forum General Programming
    Replies: 6
    Last Post: 12th September 2006, 15:54
  5. Custom Widget Plugin Analog Clock
    By kemp in forum Qt Programming
    Replies: 8
    Last Post: 11th August 2006, 14:22

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.